Date:2011-07-01 05:20:13 (8 years 5 months ago)
Author:nbd
Commit:ce9cff25768b1defdee5fc275c428729db1989a4
Message: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)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27322 3c298f89-4303-0410-b956-a3cf2f4a3e73
Files: target/linux/generic/files/drivers/char/gpio_dev.c (3 diffs)
target/linux/generic/patches-2.6.36/411-gpio_ioctl.patch (1 diff)
target/linux/generic/patches-2.6.37/834-gpio_ioctl.patch (1 diff)
target/linux/generic/patches-2.6.38/834-gpio_ioctl.patch (1 diff)
target/linux/generic/patches-2.6.39/834-gpio_ioctl.patch (1 diff)
target/linux/generic/patches-3.0/834-gpio_ioctl.patch (1 diff)

Change Details

target/linux/generic/files/drivers/char/gpio_dev.c
3232#include <linux/device.h>
3333#include <linux/platform_device.h>
3434#include <linux/gpio_dev.h>
35#include <linux/fs.h>
3536
3637#define DRVNAME "gpiodev"
3738#define DEVNAME "gpio"
...... 
4243
4344/* third argument of user space ioctl ('arg' here) contains the <pin> */
4445static int
45gpio_ioctl(struct inode * inode, struct file * file, unsigned int cmd,
46       unsigned long arg)
46gpio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
4747{
4848    int retval = 0;
4949
...... 
114114}
115115
116116struct file_operations gpio_fops = {
117    ioctl: gpio_ioctl,
117    unlocked_ioctl: gpio_ioctl,
118118    open: gpio_open,
119119    release: gpio_close
120120};
target/linux/generic/patches-2.6.36/411-gpio_ioctl.patch
1+++ b/drivers/char/gpio_dev.c
2@@ -114,7 +114,7 @@ gpio_close(struct inode * inode, struct
3 }
4
5 struct file_operations gpio_fops = {
6- ioctl: gpio_ioctl,
7+ unlocked_ioctl: gpio_ioctl,
8     open: gpio_open,
9     release: gpio_close
10 };
target/linux/generic/patches-2.6.37/834-gpio_ioctl.patch
1+++ b/drivers/char/gpio_dev.c
2@@ -114,7 +114,7 @@ gpio_close(struct inode * inode, struct
3 }
4
5 struct file_operations gpio_fops = {
6- ioctl: gpio_ioctl,
7+ unlocked_ioctl: gpio_ioctl,
8     open: gpio_open,
9     release: gpio_close
10 };
target/linux/generic/patches-2.6.38/834-gpio_ioctl.patch
1+++ b/drivers/char/gpio_dev.c
2@@ -114,7 +114,7 @@ gpio_close(struct inode * inode, struct
3 }
4
5 struct file_operations gpio_fops = {
6- ioctl: gpio_ioctl,
7+ unlocked_ioctl: gpio_ioctl,
8     open: gpio_open,
9     release: gpio_close
10 };
target/linux/generic/patches-2.6.39/834-gpio_ioctl.patch
1+++ b/drivers/char/gpio_dev.c
2@@ -114,7 +114,7 @@ gpio_close(struct inode * inode, struct
3 }
4
5 struct file_operations gpio_fops = {
6- ioctl: gpio_ioctl,
7+ unlocked_ioctl: gpio_ioctl,
8     open: gpio_open,
9     release: gpio_close
10 };
target/linux/generic/patches-3.0/834-gpio_ioctl.patch
1+++ b/drivers/char/gpio_dev.c
2@@ -114,7 +114,7 @@ gpio_close(struct inode * inode, struct
3 }
4
5 struct file_operations gpio_fops = {
6- ioctl: gpio_ioctl,
7+ unlocked_ioctl: gpio_ioctl,
8     open: gpio_open,
9     release: gpio_close
10 };

Archive Download the corresponding diff file



interactive