From 8c8c51f5d53d451b9b1b65ee29bdd66f45dd9859 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 10 Apr 2011 15:08:28 +0000 Subject: 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 --- target/linux/amazon/files/drivers/net/admmod.c | 12 +++++++++++- target/linux/amazon/files/drivers/watchdog/amazon_wdt.c | 9 +++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'target/linux/amazon/files/drivers') diff --git a/target/linux/amazon/files/drivers/net/admmod.c b/target/linux/amazon/files/drivers/net/admmod.c index 70ba1496a1..473a1f6387 100644 --- a/target/linux/amazon/files/drivers/net/admmod.c +++ b/target/linux/amazon/files/drivers/net/admmod.c @@ -39,6 +39,7 @@ /* 507281:linmars 2005/07/28 support MDIO/EEPROM config mode */ /* 509201:linmars remove driver testing codes */ +#include #include #include #include @@ -948,7 +949,12 @@ int adm_release(struct inode *inode, struct file *filp) } /* IOCTL function */ -int adm_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long args) + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) +static long adm_ioctl(struct file *filp, unsigned int cmd, unsigned long args) +#else +static int adm_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long args) +#endif { PREGRW uREGRW; unsigned int rtval; @@ -1346,7 +1352,11 @@ struct file_operations adm_ops = write: adm_write, open: adm_open, release: adm_release, +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unlocked_ioctl: adm_ioctl +#else ioctl: adm_ioctl +#endif }; int adm_proc(char *buf, char **start, off_t offset, int count, int *eof, void *data) diff --git a/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c b/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c index fcf1649d85..89f1e2281c 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 */ +#include #include #include #include @@ -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, }; -- cgit v1.2.3