diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 12:13:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 12:13:00 -0700 |
commit | f063a0c0c995d010960efcc1b2ed14b99674f25c (patch) | |
tree | 106e30acd1a58b3cf9f3c15abe1de83f1919e03b /drivers/staging/lirc | |
parent | 3c3762957818dc902222733a8184f23102e24472 (diff) | |
parent | 5af634789c93b97cfb314a102436716be8fbc577 (diff) | |
download | linux-stable-f063a0c0c995d010960efcc1b2ed14b99674f25c.tar.gz linux-stable-f063a0c0c995d010960efcc1b2ed14b99674f25c.tar.bz2 linux-stable-f063a0c0c995d010960efcc1b2ed14b99674f25c.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (841 commits)
Staging: brcm80211: fix usage of roundup in structures
Staging: bcm: fix up network device reference counting
Staging: keucr: fix up US_ macro change
staging: brcm80211: brcmfmac: Removed codeversion from firmware filenames.
staging: brcm80211: Remove unnecessary header files.
staging: brcm80211: Remove unnecessary includes from bcmutils.c
staging: brcm80211: Removed unnecessary pktsetprio() function.
Staging: brcm80211: remove typedefs.h
Staging: brcm80211: remove uintptr typedef usage
Staging: hv: remove struct vmbus_channel_interface
Staging: hv: remove Open from struct vmbus_channel_interface
Staging: hv: storvsc: call vmbus_open directly
Staging: hv: netvsc: call vmbus_open directly
Staging: hv: channel: export vmbus_open to modules
Staging: hv: remove Close from struct vmbus_channel_interface
Staging: hv: netvsc: call vmbus_close directly
Staging: hv: storvsc: call vmbus_close directly
Staging: hv: channel: export vmbus_close to modules
Staging: hv: remove SendPacket from struct vmbus_channel_interface
Staging: hv: storvsc: call vmbus_sendpacket directly
...
Fix up conflicts in
drivers/staging/cx25821/cx25821-audio-upstream.c
drivers/staging/cx25821/cx25821-audio.h
due to warring whitespace cleanups (neither of which were all that great)
Diffstat (limited to 'drivers/staging/lirc')
-rw-r--r-- | drivers/staging/lirc/lirc_imon.c | 16 | ||||
-rw-r--r-- | drivers/staging/lirc/lirc_parallel.c | 1 | ||||
-rw-r--r-- | drivers/staging/lirc/lirc_sasem.c | 15 | ||||
-rw-r--r-- | drivers/staging/lirc/lirc_zilog.c | 10 |
4 files changed, 21 insertions, 21 deletions
diff --git a/drivers/staging/lirc/lirc_imon.c b/drivers/staging/lirc/lirc_imon.c index ed5c5fe022c9..0da6b9518af9 100644 --- a/drivers/staging/lirc/lirc_imon.c +++ b/drivers/staging/lirc/lirc_imon.c @@ -278,7 +278,7 @@ static int display_close(struct inode *inode, struct file *file) struct imon_context *context = NULL; int retval = 0; - context = (struct imon_context *)file->private_data; + context = file->private_data; if (!context) { err("%s: no context for device", __func__); @@ -321,7 +321,6 @@ static int send_packet(struct imon_context *context) unsigned int pipe; int interval = 0; int retval = 0; - struct usb_ctrlrequest *control_req = NULL; /* Check if we need to use control or interrupt urb */ pipe = usb_sndintpipe(context->usbdev, @@ -356,8 +355,6 @@ static int send_packet(struct imon_context *context) err("%s: packet tx failed (%d)", __func__, retval); } - kfree(control_req); - return retval; } @@ -384,7 +381,7 @@ static ssize_t vfd_write(struct file *file, const char *buf, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF }; int *data_buf; - context = (struct imon_context *)file->private_data; + context = file->private_data; if (!context) { err("%s: no context for device", __func__); return -ENODEV; @@ -600,7 +597,7 @@ static void imon_incoming_packet(struct imon_context *context, struct device *dev = context->driver->dev; int octet, bit; unsigned char mask; - int i, chunk_num; + int i; /* * just bail out if no listening IR client @@ -659,7 +656,7 @@ static void imon_incoming_packet(struct imon_context *context, } } - if (chunk_num == 10) { + if (buf[7] == 10) { if (context->rx.count) { submit_data(context); context->rx.count = 0; @@ -877,7 +874,7 @@ static int imon_probe(struct usb_interface *interface, if (lirc_minor < 0) { err("%s: lirc_register_driver failed", __func__); alloc_status = 7; - goto alloc_status_switch; + goto unlock; } else dev_info(dev, "Registered iMON driver " "(lirc minor: %d)\n", lirc_minor); @@ -933,8 +930,9 @@ static int imon_probe(struct usb_interface *interface, "usb<%d:%d> initialized\n", vendor, product, ifnum, usbdev->bus->busnum, usbdev->devnum); -alloc_status_switch: +unlock: mutex_unlock(&context->ctx_lock); +alloc_status_switch: switch (alloc_status) { case 7: diff --git a/drivers/staging/lirc/lirc_parallel.c b/drivers/staging/lirc/lirc_parallel.c index 884904c782d1..dfd2c447e67d 100644 --- a/drivers/staging/lirc/lirc_parallel.c +++ b/drivers/staging/lirc/lirc_parallel.c @@ -36,7 +36,6 @@ #include <linux/delay.h> #include <linux/io.h> -#include <linux/signal.h> #include <linux/irq.h> #include <linux/uaccess.h> #include <asm/div64.h> diff --git a/drivers/staging/lirc/lirc_sasem.c b/drivers/staging/lirc/lirc_sasem.c index 8f72a84f34ec..998485ebdbce 100644 --- a/drivers/staging/lirc/lirc_sasem.c +++ b/drivers/staging/lirc/lirc_sasem.c @@ -387,8 +387,10 @@ static ssize_t vfd_write(struct file *file, const char *buf, } data_buf = memdup_user(buf, n_bytes); - if (PTR_ERR(data_buf)) - return PTR_ERR(data_buf); + if (IS_ERR(data_buf)) { + retval = PTR_ERR(data_buf); + goto exit; + } memcpy(context->tx.data_buf, data_buf, n_bytes); @@ -513,7 +515,7 @@ exit: mutex_unlock(&context->ctx_lock); mutex_unlock(&disconnect_lock); - return 0; + return retval; } /** @@ -804,7 +806,8 @@ static int sasem_probe(struct usb_interface *interface, if (lirc_minor < 0) { err("%s: lirc_register_driver failed", __func__); alloc_status = 7; - mutex_unlock(&context->ctx_lock); + retval = lirc_minor; + goto unlock; } else printk(KERN_INFO "%s: Registered Sasem driver (minor:%d)\n", __func__, lirc_minor); @@ -829,7 +832,7 @@ alloc_status_switch: context = NULL; case 1: retval = -ENOMEM; - goto exit; + goto unlock; } /* Needed while unregistering! */ @@ -860,7 +863,7 @@ alloc_status_switch: printk(KERN_INFO "%s: Sasem device on usb<%d:%d> initialized\n", __func__, dev->bus->busnum, dev->devnum); - +unlock: mutex_unlock(&context->ctx_lock); exit: return retval; diff --git a/drivers/staging/lirc/lirc_zilog.c b/drivers/staging/lirc/lirc_zilog.c index d92064498523..f0076eb025f1 100644 --- a/drivers/staging/lirc/lirc_zilog.c +++ b/drivers/staging/lirc/lirc_zilog.c @@ -716,7 +716,7 @@ static loff_t lseek(struct file *filep, loff_t offset, int orig) /* copied from lirc_dev */ static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos) { - struct IR *ir = (struct IR *)filep->private_data; + struct IR *ir = filep->private_data; unsigned char buf[ir->buf.chunk_size]; int ret = 0, written = 0; DECLARE_WAITQUEUE(wait, current); @@ -898,7 +898,7 @@ done: static ssize_t write(struct file *filep, const char *buf, size_t n, loff_t *ppos) { - struct IR *ir = (struct IR *)filep->private_data; + struct IR *ir = filep->private_data; size_t i; int failures = 0; @@ -972,7 +972,7 @@ static ssize_t write(struct file *filep, const char *buf, size_t n, /* copied from lirc_dev */ static unsigned int poll(struct file *filep, poll_table *wait) { - struct IR *ir = (struct IR *)filep->private_data; + struct IR *ir = filep->private_data; unsigned int ret; dprintk("poll called\n"); @@ -994,7 +994,7 @@ static unsigned int poll(struct file *filep, poll_table *wait) static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg) { - struct IR *ir = (struct IR *)filep->private_data; + struct IR *ir = filep->private_data; int result; unsigned long mode, features = 0; @@ -1086,7 +1086,7 @@ static int open(struct inode *node, struct file *filep) static int close(struct inode *node, struct file *filep) { /* find our IR struct */ - struct IR *ir = (struct IR *)filep->private_data; + struct IR *ir = filep->private_data; if (ir == NULL) { zilog_error("close: no private_data attached to the file!\n"); return -ENODEV; |