summaryrefslogtreecommitdiffstats
path: root/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c
diff options
context:
space:
mode:
authorhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-04-10 15:08:28 +0000
committerhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-04-10 15:08:28 +0000
commit126a87196ce4e7ea80c71692c22514f6cb549820 (patch)
tree333f3c15891a91643ba22329bf8622ab4ba87095 /target/linux/amazon/files/drivers/watchdog/amazon_wdt.c
parentb722ce28afb482ccdff01d4b28b7adc55f8c2ed6 (diff)
amazon: Upgrade amazon target to kernel 2.6.37
This was just a little bit tested on an SAMSUNG SMT-G3020 and pci and usb do not work like before. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26576 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/amazon/files/drivers/watchdog/amazon_wdt.c')
-rw-r--r--target/linux/amazon/files/drivers/watchdog/amazon_wdt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c b/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c
index fcf1649d8..89f1e2281 100644
--- a/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c
+++ b/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c
@@ -17,6 +17,7 @@
* Copyright (C) 2007 John Crispin <blogic@openwrt.org>
*/
+#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched.h>
@@ -118,7 +119,11 @@ void wdt_disable(void)
return;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+#else
static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+#endif
{
int result=0;
static int timeout=-1;
@@ -201,7 +206,11 @@ int wdt_register_proc_read(char *buf, char **start, off_t offset,
static struct file_operations wdt_fops = {
read: wdt_read,
write: wdt_write,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+ unlocked_ioctl: wdt_ioctl,
+#else
ioctl: wdt_ioctl,
+#endif
open: wdt_open,
release: wdt_release,
};