From 290f8c00ae83e7e83f6e7bb762274e434eb1132d Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 1 Jul 2011 03:20:13 +0000 Subject: [PATCH] fix the gpio_dev driver: remove existing forward port patches, use unlocked_ioctl on all platforms and fix the arguments to the ioctl handler (based on patch from #9198) SVN-Revision: 27322 --- target/linux/generic/files/drivers/char/gpio_dev.c | 6 +++--- .../linux/generic/patches-2.6.36/411-gpio_ioctl.patch | 11 ----------- .../linux/generic/patches-2.6.37/834-gpio_ioctl.patch | 11 ----------- .../linux/generic/patches-2.6.38/834-gpio_ioctl.patch | 11 ----------- .../linux/generic/patches-2.6.39/834-gpio_ioctl.patch | 11 ----------- target/linux/generic/patches-3.0/834-gpio_ioctl.patch | 11 ----------- 6 files changed, 3 insertions(+), 58 deletions(-) delete mode 100644 target/linux/generic/patches-2.6.36/411-gpio_ioctl.patch delete mode 100644 target/linux/generic/patches-2.6.37/834-gpio_ioctl.patch delete mode 100644 target/linux/generic/patches-2.6.38/834-gpio_ioctl.patch delete mode 100644 target/linux/generic/patches-2.6.39/834-gpio_ioctl.patch delete mode 100644 target/linux/generic/patches-3.0/834-gpio_ioctl.patch diff --git a/target/linux/generic/files/drivers/char/gpio_dev.c b/target/linux/generic/files/drivers/char/gpio_dev.c index e6d5b1d05e..0f428bd38b 100644 --- a/target/linux/generic/files/drivers/char/gpio_dev.c +++ b/target/linux/generic/files/drivers/char/gpio_dev.c @@ -32,6 +32,7 @@ #include #include #include +#include #define DRVNAME "gpiodev" #define DEVNAME "gpio" @@ -42,8 +43,7 @@ static struct class *gpiodev_class; /* third argument of user space ioctl ('arg' here) contains the */ static int -gpio_ioctl(struct inode * inode, struct file * file, unsigned int cmd, - unsigned long arg) +gpio_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { int retval = 0; @@ -114,7 +114,7 @@ gpio_close(struct inode * inode, struct file * file) } struct file_operations gpio_fops = { - ioctl: gpio_ioctl, + unlocked_ioctl: gpio_ioctl, open: gpio_open, release: gpio_close }; diff --git a/target/linux/generic/patches-2.6.36/411-gpio_ioctl.patch b/target/linux/generic/patches-2.6.36/411-gpio_ioctl.patch deleted file mode 100644 index 6609a1670a..0000000000 --- a/target/linux/generic/patches-2.6.36/411-gpio_ioctl.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/char/gpio_dev.c -+++ b/drivers/char/gpio_dev.c -@@ -114,7 +114,7 @@ gpio_close(struct inode * inode, struct - } - - struct file_operations gpio_fops = { -- ioctl: gpio_ioctl, -+ unlocked_ioctl: gpio_ioctl, - open: gpio_open, - release: gpio_close - }; diff --git a/target/linux/generic/patches-2.6.37/834-gpio_ioctl.patch b/target/linux/generic/patches-2.6.37/834-gpio_ioctl.patch deleted file mode 100644 index 3b7063223e..0000000000 --- a/target/linux/generic/patches-2.6.37/834-gpio_ioctl.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/char/gpio_dev.c -+++ b/drivers/char/gpio_dev.c -@@ -114,7 +114,7 @@ gpio_close(struct inode * inode, struct - } - - struct file_operations gpio_fops = { -- ioctl: gpio_ioctl, -+ unlocked_ioctl: gpio_ioctl, - open: gpio_open, - release: gpio_close - }; diff --git a/target/linux/generic/patches-2.6.38/834-gpio_ioctl.patch b/target/linux/generic/patches-2.6.38/834-gpio_ioctl.patch deleted file mode 100644 index 3b7063223e..0000000000 --- a/target/linux/generic/patches-2.6.38/834-gpio_ioctl.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/char/gpio_dev.c -+++ b/drivers/char/gpio_dev.c -@@ -114,7 +114,7 @@ gpio_close(struct inode * inode, struct - } - - struct file_operations gpio_fops = { -- ioctl: gpio_ioctl, -+ unlocked_ioctl: gpio_ioctl, - open: gpio_open, - release: gpio_close - }; diff --git a/target/linux/generic/patches-2.6.39/834-gpio_ioctl.patch b/target/linux/generic/patches-2.6.39/834-gpio_ioctl.patch deleted file mode 100644 index 3b7063223e..0000000000 --- a/target/linux/generic/patches-2.6.39/834-gpio_ioctl.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/char/gpio_dev.c -+++ b/drivers/char/gpio_dev.c -@@ -114,7 +114,7 @@ gpio_close(struct inode * inode, struct - } - - struct file_operations gpio_fops = { -- ioctl: gpio_ioctl, -+ unlocked_ioctl: gpio_ioctl, - open: gpio_open, - release: gpio_close - }; diff --git a/target/linux/generic/patches-3.0/834-gpio_ioctl.patch b/target/linux/generic/patches-3.0/834-gpio_ioctl.patch deleted file mode 100644 index 3b7063223e..0000000000 --- a/target/linux/generic/patches-3.0/834-gpio_ioctl.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/char/gpio_dev.c -+++ b/drivers/char/gpio_dev.c -@@ -114,7 +114,7 @@ gpio_close(struct inode * inode, struct - } - - struct file_operations gpio_fops = { -- ioctl: gpio_ioctl, -+ unlocked_ioctl: gpio_ioctl, - open: gpio_open, - release: gpio_close - }; -- 2.30.2