aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lirc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 15:13:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 15:13:00 -0400
commitf063a0c0c995d010960efcc1b2ed14b99674f25c (patch)
tree106e30acd1a58b3cf9f3c15abe1de83f1919e03b /drivers/staging/lirc
parent3c3762957818dc902222733a8184f23102e24472 (diff)
parent5af634789c93b97cfb314a102436716be8fbc577 (diff)
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.c16
-rw-r--r--drivers/staging/lirc/lirc_parallel.c1
-rw-r--r--drivers/staging/lirc/lirc_sasem.c15
-rw-r--r--drivers/staging/lirc/lirc_zilog.c10
4 files changed, 21 insertions, 21 deletions
diff --git a/drivers/staging/lirc/lirc_imon.c b/drivers/staging/lirc/lirc_imon.c
index ed5c5fe022c..0da6b9518af 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)
278 struct imon_context *context = NULL; 278 struct imon_context *context = NULL;
279 int retval = 0; 279 int retval = 0;
280 280
281 context = (struct imon_context *)file->private_data; 281 context = file->private_data;
282 282
283 if (!context) { 283 if (!context) {
284 err("%s: no context for device", __func__); 284 err("%s: no context for device", __func__);
@@ -321,7 +321,6 @@ static int send_packet(struct imon_context *context)
321 unsigned int pipe; 321 unsigned int pipe;
322 int interval = 0; 322 int interval = 0;
323 int retval = 0; 323 int retval = 0;
324 struct usb_ctrlrequest *control_req = NULL;
325 324
326 /* Check if we need to use control or interrupt urb */ 325 /* Check if we need to use control or interrupt urb */
327 pipe = usb_sndintpipe(context->usbdev, 326 pipe = usb_sndintpipe(context->usbdev,
@@ -356,8 +355,6 @@ static int send_packet(struct imon_context *context)
356 err("%s: packet tx failed (%d)", __func__, retval); 355 err("%s: packet tx failed (%d)", __func__, retval);
357 } 356 }
358 357
359 kfree(control_req);
360
361 return retval; 358 return retval;
362} 359}
363 360
@@ -384,7 +381,7 @@ static ssize_t vfd_write(struct file *file, const char *buf,
384 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF }; 381 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF };
385 int *data_buf; 382 int *data_buf;
386 383
387 context = (struct imon_context *)file->private_data; 384 context = file->private_data;
388 if (!context) { 385 if (!context) {
389 err("%s: no context for device", __func__); 386 err("%s: no context for device", __func__);
390 return -ENODEV; 387 return -ENODEV;
@@ -600,7 +597,7 @@ static void imon_incoming_packet(struct imon_context *context,
600 struct device *dev = context->driver->dev; 597 struct device *dev = context->driver->dev;
601 int octet, bit; 598 int octet, bit;
602 unsigned char mask; 599 unsigned char mask;
603 int i, chunk_num; 600 int i;
604 601
605 /* 602 /*
606 * just bail out if no listening IR client 603 * just bail out if no listening IR client
@@ -659,7 +656,7 @@ static void imon_incoming_packet(struct imon_context *context,
659 } 656 }
660 } 657 }
661 658
662 if (chunk_num == 10) { 659 if (buf[7] == 10) {
663 if (context->rx.count) { 660 if (context->rx.count) {
664 submit_data(context); 661 submit_data(context);
665 context->rx.count = 0; 662 context->rx.count = 0;
@@ -877,7 +874,7 @@ static int imon_probe(struct usb_interface *interface,
877 if (lirc_minor < 0) { 874 if (lirc_minor < 0) {
878 err("%s: lirc_register_driver failed", __func__); 875 err("%s: lirc_register_driver failed", __func__);
879 alloc_status = 7; 876 alloc_status = 7;
880 goto alloc_status_switch; 877 goto unlock;
881 } else 878 } else
882 dev_info(dev, "Registered iMON driver " 879 dev_info(dev, "Registered iMON driver "
883 "(lirc minor: %d)\n", lirc_minor); 880 "(lirc minor: %d)\n", lirc_minor);
@@ -933,8 +930,9 @@ static int imon_probe(struct usb_interface *interface,
933 "usb<%d:%d> initialized\n", vendor, product, ifnum, 930 "usb<%d:%d> initialized\n", vendor, product, ifnum,
934 usbdev->bus->busnum, usbdev->devnum); 931 usbdev->bus->busnum, usbdev->devnum);
935 932
936alloc_status_switch: 933unlock:
937 mutex_unlock(&context->ctx_lock); 934 mutex_unlock(&context->ctx_lock);
935alloc_status_switch:
938 936
939 switch (alloc_status) { 937 switch (alloc_status) {
940 case 7: 938 case 7:
diff --git a/drivers/staging/lirc/lirc_parallel.c b/drivers/staging/lirc/lirc_parallel.c
index 884904c782d..dfd2c447e67 100644
--- a/drivers/staging/lirc/lirc_parallel.c
+++ b/drivers/staging/lirc/lirc_parallel.c
@@ -36,7 +36,6 @@
36#include <linux/delay.h> 36#include <linux/delay.h>
37 37
38#include <linux/io.h> 38#include <linux/io.h>
39#include <linux/signal.h>
40#include <linux/irq.h> 39#include <linux/irq.h>
41#include <linux/uaccess.h> 40#include <linux/uaccess.h>
42#include <asm/div64.h> 41#include <asm/div64.h>
diff --git a/drivers/staging/lirc/lirc_sasem.c b/drivers/staging/lirc/lirc_sasem.c
index 8f72a84f34e..998485ebdbc 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,
387 } 387 }
388 388
389 data_buf = memdup_user(buf, n_bytes); 389 data_buf = memdup_user(buf, n_bytes);
390 if (PTR_ERR(data_buf)) 390 if (IS_ERR(data_buf)) {
391 return PTR_ERR(data_buf); 391 retval = PTR_ERR(data_buf);
392 goto exit;
393 }
392 394
393 memcpy(context->tx.data_buf, data_buf, n_bytes); 395 memcpy(context->tx.data_buf, data_buf, n_bytes);
394 396
@@ -513,7 +515,7 @@ exit:
513 mutex_unlock(&context->ctx_lock); 515 mutex_unlock(&context->ctx_lock);
514 516
515 mutex_unlock(&disconnect_lock); 517 mutex_unlock(&disconnect_lock);
516 return 0; 518 return retval;
517} 519}
518 520
519/** 521/**
@@ -804,7 +806,8 @@ static int sasem_probe(struct usb_interface *interface,
804 if (lirc_minor < 0) { 806 if (lirc_minor < 0) {
805 err("%s: lirc_register_driver failed", __func__); 807 err("%s: lirc_register_driver failed", __func__);
806 alloc_status = 7; 808 alloc_status = 7;
807 mutex_unlock(&context->ctx_lock); 809 retval = lirc_minor;
810 goto unlock;
808 } else 811 } else
809 printk(KERN_INFO "%s: Registered Sasem driver (minor:%d)\n", 812 printk(KERN_INFO "%s: Registered Sasem driver (minor:%d)\n",
810 __func__, lirc_minor); 813 __func__, lirc_minor);
@@ -829,7 +832,7 @@ alloc_status_switch:
829 context = NULL; 832 context = NULL;
830 case 1: 833 case 1:
831 retval = -ENOMEM; 834 retval = -ENOMEM;
832 goto exit; 835 goto unlock;
833 } 836 }
834 837
835 /* Needed while unregistering! */ 838 /* Needed while unregistering! */
@@ -860,7 +863,7 @@ alloc_status_switch:
860 863
861 printk(KERN_INFO "%s: Sasem device on usb<%d:%d> initialized\n", 864 printk(KERN_INFO "%s: Sasem device on usb<%d:%d> initialized\n",
862 __func__, dev->bus->busnum, dev->devnum); 865 __func__, dev->bus->busnum, dev->devnum);
863 866unlock:
864 mutex_unlock(&context->ctx_lock); 867 mutex_unlock(&context->ctx_lock);
865exit: 868exit:
866 return retval; 869 return retval;
diff --git a/drivers/staging/lirc/lirc_zilog.c b/drivers/staging/lirc/lirc_zilog.c
index d9206449852..f0076eb025f 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)
716/* copied from lirc_dev */ 716/* copied from lirc_dev */
717static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos) 717static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos)
718{ 718{
719 struct IR *ir = (struct IR *)filep->private_data; 719 struct IR *ir = filep->private_data;
720 unsigned char buf[ir->buf.chunk_size]; 720 unsigned char buf[ir->buf.chunk_size];
721 int ret = 0, written = 0; 721 int ret = 0, written = 0;
722 DECLARE_WAITQUEUE(wait, current); 722 DECLARE_WAITQUEUE(wait, current);
@@ -898,7 +898,7 @@ done:
898static ssize_t write(struct file *filep, const char *buf, size_t n, 898static ssize_t write(struct file *filep, const char *buf, size_t n,
899 loff_t *ppos) 899 loff_t *ppos)
900{ 900{
901 struct IR *ir = (struct IR *)filep->private_data; 901 struct IR *ir = filep->private_data;
902 size_t i; 902 size_t i;
903 int failures = 0; 903 int failures = 0;
904 904
@@ -972,7 +972,7 @@ static ssize_t write(struct file *filep, const char *buf, size_t n,
972/* copied from lirc_dev */ 972/* copied from lirc_dev */
973static unsigned int poll(struct file *filep, poll_table *wait) 973static unsigned int poll(struct file *filep, poll_table *wait)
974{ 974{
975 struct IR *ir = (struct IR *)filep->private_data; 975 struct IR *ir = filep->private_data;
976 unsigned int ret; 976 unsigned int ret;
977 977
978 dprintk("poll called\n"); 978 dprintk("poll called\n");
@@ -994,7 +994,7 @@ static unsigned int poll(struct file *filep, poll_table *wait)
994 994
995static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg) 995static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
996{ 996{
997 struct IR *ir = (struct IR *)filep->private_data; 997 struct IR *ir = filep->private_data;
998 int result; 998 int result;
999 unsigned long mode, features = 0; 999 unsigned long mode, features = 0;
1000 1000
@@ -1086,7 +1086,7 @@ static int open(struct inode *node, struct file *filep)
1086static int close(struct inode *node, struct file *filep) 1086static int close(struct inode *node, struct file *filep)
1087{ 1087{
1088 /* find our IR struct */ 1088 /* find our IR struct */
1089 struct IR *ir = (struct IR *)filep->private_data; 1089 struct IR *ir = filep->private_data;
1090 if (ir == NULL) { 1090 if (ir == NULL) {
1091 zilog_error("close: no private_data attached to the file!\n"); 1091 zilog_error("close: no private_data attached to the file!\n");
1092 return -ENODEV; 1092 return -ENODEV;