omap24xx cbus: fix ioctls

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23083 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Michael Büsch 2010-09-18 18:14:17 +00:00
parent b9da6ced16
commit 84869481f4
2 changed files with 21 additions and 24 deletions

View File

@ -8,16 +8,16 @@
drivers/cbus/retu-headset.c | 356 ++++++++++++++++++ drivers/cbus/retu-headset.c | 356 ++++++++++++++++++
drivers/cbus/retu-pwrbutton.c | 118 ++++++ drivers/cbus/retu-pwrbutton.c | 118 ++++++
drivers/cbus/retu-rtc.c | 477 ++++++++++++++++++++++++ drivers/cbus/retu-rtc.c | 477 ++++++++++++++++++++++++
drivers/cbus/retu-user.c | 425 ++++++++++++++++++++++ drivers/cbus/retu-user.c | 424 ++++++++++++++++++++++
drivers/cbus/retu-wdt.c | 388 ++++++++++++++++++++ drivers/cbus/retu-wdt.c | 387 ++++++++++++++++++++
drivers/cbus/retu.c | 468 ++++++++++++++++++++++++ drivers/cbus/retu.c | 468 ++++++++++++++++++++++++
drivers/cbus/retu.h | 77 ++++ drivers/cbus/retu.h | 77 ++++
drivers/cbus/tahvo-usb.c | 788 +++++++++++++++++++++++++++++++++++++++++ drivers/cbus/tahvo-usb.c | 788 +++++++++++++++++++++++++++++++++++++++++
drivers/cbus/tahvo-user.c | 407 +++++++++++++++++++++ drivers/cbus/tahvo-user.c | 406 +++++++++++++++++++++
drivers/cbus/tahvo.c | 443 +++++++++++++++++++++++ drivers/cbus/tahvo.c | 443 +++++++++++++++++++++++
drivers/cbus/tahvo.h | 61 +++ drivers/cbus/tahvo.h | 61 +++
drivers/cbus/user_retu_tahvo.h | 75 +++ drivers/cbus/user_retu_tahvo.h | 75 +++
18 files changed, 4536 insertions(+), 1 deletion(-) 18 files changed, 4533 insertions(+), 1 deletion(-)
--- /dev/null --- /dev/null
+++ linux-2.6.36-rc4/drivers/cbus/cbus.c +++ linux-2.6.36-rc4/drivers/cbus/cbus.c
@ -1992,7 +1992,7 @@
+MODULE_AUTHOR("Paul Mundt and Igor Stoppa"); +MODULE_AUTHOR("Paul Mundt and Igor Stoppa");
--- /dev/null --- /dev/null
+++ linux-2.6.36-rc4/drivers/cbus/retu-user.c +++ linux-2.6.36-rc4/drivers/cbus/retu-user.c
@@ -0,0 +1,425 @@ @@ -0,0 +1,424 @@
+/** +/**
+ * drivers/cbus/retu-user.c + * drivers/cbus/retu-user.c
+ * + *
@ -2265,8 +2265,7 @@
+/* +/*
+ * Device control (ioctl) + * Device control (ioctl)
+ */ + */
+static int retu_ioctl(struct inode *inode, struct file *filp, +static long retu_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
+ unsigned int cmd, unsigned long arg)
+{ +{
+ struct retu_tahvo_write_parms par; + struct retu_tahvo_write_parms par;
+ int ret; + int ret;
@ -2420,7 +2419,7 @@
+MODULE_AUTHOR("Mikko Ylinen"); +MODULE_AUTHOR("Mikko Ylinen");
--- /dev/null --- /dev/null
+++ linux-2.6.36-rc4/drivers/cbus/retu-wdt.c +++ linux-2.6.36-rc4/drivers/cbus/retu-wdt.c
@@ -0,0 +1,388 @@ @@ -0,0 +1,387 @@
+/** +/**
+ * drivers/cbus/retu-wdt.c + * drivers/cbus/retu-wdt.c
+ * + *
@ -2609,8 +2608,7 @@
+ return len; + return len;
+} +}
+ +
+static int retu_wdt_ioctl(struct inode *inode, struct file *file, +static long retu_wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+ unsigned int cmd, unsigned long arg)
+{ +{
+ int new_margin; + int new_margin;
+ +
@ -4112,7 +4110,7 @@
+MODULE_AUTHOR("Juha Yrjölä, Tony Lindgren, and Timo Teräs"); +MODULE_AUTHOR("Juha Yrjölä, Tony Lindgren, and Timo Teräs");
--- /dev/null --- /dev/null
+++ linux-2.6.36-rc4/drivers/cbus/tahvo-user.c +++ linux-2.6.36-rc4/drivers/cbus/tahvo-user.c
@@ -0,0 +1,407 @@ @@ -0,0 +1,406 @@
+/** +/**
+ * drivers/cbus/tahvo-user.c + * drivers/cbus/tahvo-user.c
+ * + *
@ -4369,8 +4367,7 @@
+/* +/*
+ * Device control (ioctl) + * Device control (ioctl)
+ */ + */
+static int tahvo_ioctl(struct inode *inode, struct file *filp, +static long tahvo_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
+ unsigned int cmd, unsigned long arg)
+{ +{
+ struct retu_tahvo_write_parms par; + struct retu_tahvo_write_parms par;
+ int ret; + int ret;

View File

@ -4,8 +4,8 @@
drivers/cbus/tahvo-user.c | 75 +++++++++++++++++++++++++++++ drivers/cbus/tahvo-user.c | 75 +++++++++++++++++++++++++++++
3 files changed, 198 insertions(+), 2 deletions(-) 3 files changed, 198 insertions(+), 2 deletions(-)
--- linux-2.6.35.orig/drivers/cbus/Kconfig --- linux-2.6.36-rc4.orig/drivers/cbus/Kconfig
+++ linux-2.6.35/drivers/cbus/Kconfig +++ linux-2.6.36-rc4/drivers/cbus/Kconfig
@@ -28,6 +28,10 @@ config CBUS_TAHVO_USER @@ -28,6 +28,10 @@ config CBUS_TAHVO_USER
If you want support for Tahvo's user space read/write etc. functions, If you want support for Tahvo's user space read/write etc. functions,
you should say Y here. you should say Y here.
@ -28,8 +28,8 @@
config CBUS_RETU_POWERBUTTON config CBUS_RETU_POWERBUTTON
depends on CBUS_RETU depends on CBUS_RETU
bool "Support for Retu power button" bool "Support for Retu power button"
--- linux-2.6.35.orig/drivers/cbus/retu-user.c --- linux-2.6.36-rc4.orig/drivers/cbus/retu-user.c
+++ linux-2.6.35/drivers/cbus/retu-user.c +++ linux-2.6.36-rc4/drivers/cbus/retu-user.c
@@ -46,6 +46,12 @@ @@ -46,6 +46,12 @@
#define PFX "retu-user: " #define PFX "retu-user: "
@ -168,8 +168,8 @@
/* Right justify value */ /* Right justify value */
while (!(mask & 1)) { while (!(mask & 1)) {
value = value >> 1; value = value >> 1;
@@ -274,7 +377,7 @@ static int retu_ioctl(struct inode *inod @@ -273,7 +376,7 @@ static int retu_close(struct inode *inod
unsigned int cmd, unsigned long arg) static long retu_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{ {
struct retu_tahvo_write_parms par; struct retu_tahvo_write_parms par;
- int ret; - int ret;
@ -177,7 +177,7 @@
switch (cmd) { switch (cmd) {
case URT_IOCT_IRQ_SUBSCR: case URT_IOCT_IRQ_SUBSCR:
@@ -291,7 +394,15 @@ static int retu_ioctl(struct inode *inod @@ -290,7 +393,15 @@ static long retu_ioctl(struct file *filp
printk(KERN_ERR "copy_to_user failed: %d\n", ret); printk(KERN_ERR "copy_to_user failed: %d\n", ret);
break; break;
case RETU_IOCH_ADC_READ: case RETU_IOCH_ADC_READ:
@ -194,7 +194,7 @@
default: default:
return -ENOIOCTLCMD; return -ENOIOCTLCMD;
} }
@@ -333,6 +444,8 @@ static ssize_t retu_read(struct file *fi @@ -332,6 +443,8 @@ static ssize_t retu_read(struct file *fi
list_move(&irq->node, &retu_irqs_reserve); list_move(&irq->node, &retu_irqs_reserve);
spin_unlock_irqrestore(&retu_irqs_lock, flags); spin_unlock_irqrestore(&retu_irqs_lock, flags);
@ -203,8 +203,8 @@
ret = copy_to_user(buf + i * sizeof(irq_id), &irq_id, ret = copy_to_user(buf + i * sizeof(irq_id), &irq_id,
sizeof(irq_id)); sizeof(irq_id));
if (ret) if (ret)
--- linux-2.6.35.orig/drivers/cbus/tahvo-user.c --- linux-2.6.36-rc4.orig/drivers/cbus/tahvo-user.c
+++ linux-2.6.35/drivers/cbus/tahvo-user.c +++ linux-2.6.36-rc4/drivers/cbus/tahvo-user.c
@@ -46,6 +46,12 @@ @@ -46,6 +46,12 @@
#define PFX "tahvo-user: " #define PFX "tahvo-user: "
@ -313,7 +313,7 @@
/* Right justify value */ /* Right justify value */
while (!(mask & 1)) { while (!(mask & 1)) {
value = value >> 1; value = value >> 1;
@@ -315,6 +388,8 @@ static ssize_t tahvo_read(struct file *f @@ -314,6 +387,8 @@ static ssize_t tahvo_read(struct file *f
list_move(&irq->node, &tahvo_irqs_reserve); list_move(&irq->node, &tahvo_irqs_reserve);
spin_unlock_irqrestore(&tahvo_irqs_lock, flags); spin_unlock_irqrestore(&tahvo_irqs_lock, flags);