mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 00:30:16 +02:00
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
This commit is contained in:
parent
86a3fe1a88
commit
ce9cff2576
@ -32,6 +32,7 @@
|
||||
#include <linux/device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/gpio_dev.h>
|
||||
#include <linux/fs.h>
|
||||
|
||||
#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 <pin> */
|
||||
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
|
||||
};
|
||||
|
@ -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
|
||||
};
|
@ -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
|
||||
};
|
@ -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
|
||||
};
|
@ -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
|
||||
};
|
@ -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
|
||||
};
|
Loading…
Reference in New Issue
Block a user