X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/1932ef3fc46a90b00beec60bb9b746c87dce30b4..8b4aee843bbd9d4e87e2c63b9c6d9d34c142a272:/target/linux/amazon/files/drivers/net/admmod.c diff --git a/target/linux/amazon/files/drivers/net/admmod.c b/target/linux/amazon/files/drivers/net/admmod.c index 70ba1496a..473a1f638 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)