aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/dvb-usb/Kconfig2
-rw-r--r--drivers/media/dvb/ngene/ngene-core.c1
-rw-r--r--drivers/media/radio/saa7706h.c2
-rw-r--r--drivers/media/radio/tef6862.c2
-rw-r--r--drivers/media/rc/imon.c31
-rw-r--r--drivers/media/rc/ite-cir.c1
-rw-r--r--drivers/media/rc/mceusb.c2
-rw-r--r--drivers/media/rc/rc-main.c4
-rw-r--r--drivers/media/video/m52790.c2
-rw-r--r--drivers/media/video/tda9840.c2
-rw-r--r--drivers/media/video/tea6415c.c2
-rw-r--r--drivers/media/video/tea6420.c2
-rw-r--r--drivers/media/video/upd64031a.c2
-rw-r--r--drivers/media/video/upd64083.c2
14 files changed, 44 insertions, 13 deletions
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig
index ccbd39a38c46..c545039287ad 100644
--- a/drivers/media/dvb/dvb-usb/Kconfig
+++ b/drivers/media/dvb/dvb-usb/Kconfig
@@ -356,6 +356,8 @@ config DVB_USB_LME2510
356 select DVB_TDA826X if !DVB_FE_CUSTOMISE 356 select DVB_TDA826X if !DVB_FE_CUSTOMISE
357 select DVB_STV0288 if !DVB_FE_CUSTOMISE 357 select DVB_STV0288 if !DVB_FE_CUSTOMISE
358 select DVB_IX2505V if !DVB_FE_CUSTOMISE 358 select DVB_IX2505V if !DVB_FE_CUSTOMISE
359 select DVB_STV0299 if !DVB_FE_CUSTOMISE
360 select DVB_PLL if !DVB_FE_CUSTOMISE
359 help 361 help
360 Say Y here to support the LME DM04/QQBOX DVB-S USB2.0 . 362 Say Y here to support the LME DM04/QQBOX DVB-S USB2.0 .
361 363
diff --git a/drivers/media/dvb/ngene/ngene-core.c b/drivers/media/dvb/ngene/ngene-core.c
index ccc2d1af49d4..6927c726ce35 100644
--- a/drivers/media/dvb/ngene/ngene-core.c
+++ b/drivers/media/dvb/ngene/ngene-core.c
@@ -1520,6 +1520,7 @@ static int init_channel(struct ngene_channel *chan)
1520 if (dev->ci.en && (io & NGENE_IO_TSOUT)) { 1520 if (dev->ci.en && (io & NGENE_IO_TSOUT)) {
1521 dvb_ca_en50221_init(adapter, dev->ci.en, 0, 1); 1521 dvb_ca_en50221_init(adapter, dev->ci.en, 0, 1);
1522 set_transfer(chan, 1); 1522 set_transfer(chan, 1);
1523 chan->dev->channel[2].DataFormatFlags = DF_SWAP32;
1523 set_transfer(&chan->dev->channel[2], 1); 1524 set_transfer(&chan->dev->channel[2], 1);
1524 dvb_register_device(adapter, &chan->ci_dev, 1525 dvb_register_device(adapter, &chan->ci_dev,
1525 &ngene_dvbdev_ci, (void *) chan, 1526 &ngene_dvbdev_ci, (void *) chan,
diff --git a/drivers/media/radio/saa7706h.c b/drivers/media/radio/saa7706h.c
index 585680ffbfb6..b1193dfc5087 100644
--- a/drivers/media/radio/saa7706h.c
+++ b/drivers/media/radio/saa7706h.c
@@ -376,7 +376,7 @@ static int __devinit saa7706h_probe(struct i2c_client *client,
376 v4l_info(client, "chip found @ 0x%02x (%s)\n", 376 v4l_info(client, "chip found @ 0x%02x (%s)\n",
377 client->addr << 1, client->adapter->name); 377 client->addr << 1, client->adapter->name);
378 378
379 state = kmalloc(sizeof(struct saa7706h_state), GFP_KERNEL); 379 state = kzalloc(sizeof(struct saa7706h_state), GFP_KERNEL);
380 if (state == NULL) 380 if (state == NULL)
381 return -ENOMEM; 381 return -ENOMEM;
382 sd = &state->sd; 382 sd = &state->sd;
diff --git a/drivers/media/radio/tef6862.c b/drivers/media/radio/tef6862.c
index 7c0d77751f6e..0991e1973678 100644
--- a/drivers/media/radio/tef6862.c
+++ b/drivers/media/radio/tef6862.c
@@ -176,7 +176,7 @@ static int __devinit tef6862_probe(struct i2c_client *client,
176 v4l_info(client, "chip found @ 0x%02x (%s)\n", 176 v4l_info(client, "chip found @ 0x%02x (%s)\n",
177 client->addr << 1, client->adapter->name); 177 client->addr << 1, client->adapter->name);
178 178
179 state = kmalloc(sizeof(struct tef6862_state), GFP_KERNEL); 179 state = kzalloc(sizeof(struct tef6862_state), GFP_KERNEL);
180 if (state == NULL) 180 if (state == NULL)
181 return -ENOMEM; 181 return -ENOMEM;
182 state->freq = TEF6862_LO_FREQ; 182 state->freq = TEF6862_LO_FREQ;
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index ebd68edf5b24..8fc0f081b470 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -46,7 +46,7 @@
46#define MOD_AUTHOR "Jarod Wilson <jarod@wilsonet.com>" 46#define MOD_AUTHOR "Jarod Wilson <jarod@wilsonet.com>"
47#define MOD_DESC "Driver for SoundGraph iMON MultiMedia IR/Display" 47#define MOD_DESC "Driver for SoundGraph iMON MultiMedia IR/Display"
48#define MOD_NAME "imon" 48#define MOD_NAME "imon"
49#define MOD_VERSION "0.9.2" 49#define MOD_VERSION "0.9.3"
50 50
51#define DISPLAY_MINOR_BASE 144 51#define DISPLAY_MINOR_BASE 144
52#define DEVICE_NAME "lcd%d" 52#define DEVICE_NAME "lcd%d"
@@ -460,8 +460,9 @@ static int display_close(struct inode *inode, struct file *file)
460} 460}
461 461
462/** 462/**
463 * Sends a packet to the device -- this function must be called 463 * Sends a packet to the device -- this function must be called with
464 * with ictx->lock held. 464 * ictx->lock held, or its unlock/lock sequence while waiting for tx
465 * to complete can/will lead to a deadlock.
465 */ 466 */
466static int send_packet(struct imon_context *ictx) 467static int send_packet(struct imon_context *ictx)
467{ 468{
@@ -991,12 +992,21 @@ static void imon_touch_display_timeout(unsigned long data)
991 * the iMON remotes, and those used by the Windows MCE remotes (which is 992 * the iMON remotes, and those used by the Windows MCE remotes (which is
992 * really just RC-6), but only one or the other at a time, as the signals 993 * really just RC-6), but only one or the other at a time, as the signals
993 * are decoded onboard the receiver. 994 * are decoded onboard the receiver.
995 *
996 * This function gets called two different ways, one way is from
997 * rc_register_device, for initial protocol selection/setup, and the other is
998 * via a userspace-initiated protocol change request, either by direct sysfs
999 * prodding or by something like ir-keytable. In the rc_register_device case,
1000 * the imon context lock is already held, but when initiated from userspace,
1001 * it is not, so we must acquire it prior to calling send_packet, which
1002 * requires that the lock is held.
994 */ 1003 */
995static int imon_ir_change_protocol(struct rc_dev *rc, u64 rc_type) 1004static int imon_ir_change_protocol(struct rc_dev *rc, u64 rc_type)
996{ 1005{
997 int retval; 1006 int retval;
998 struct imon_context *ictx = rc->priv; 1007 struct imon_context *ictx = rc->priv;
999 struct device *dev = ictx->dev; 1008 struct device *dev = ictx->dev;
1009 bool unlock = false;
1000 unsigned char ir_proto_packet[] = { 1010 unsigned char ir_proto_packet[] = {
1001 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 }; 1011 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 };
1002 1012
@@ -1029,6 +1039,11 @@ static int imon_ir_change_protocol(struct rc_dev *rc, u64 rc_type)
1029 1039
1030 memcpy(ictx->usb_tx_buf, &ir_proto_packet, sizeof(ir_proto_packet)); 1040 memcpy(ictx->usb_tx_buf, &ir_proto_packet, sizeof(ir_proto_packet));
1031 1041
1042 if (!mutex_is_locked(&ictx->lock)) {
1043 unlock = true;
1044 mutex_lock(&ictx->lock);
1045 }
1046
1032 retval = send_packet(ictx); 1047 retval = send_packet(ictx);
1033 if (retval) 1048 if (retval)
1034 goto out; 1049 goto out;
@@ -1037,6 +1052,9 @@ static int imon_ir_change_protocol(struct rc_dev *rc, u64 rc_type)
1037 ictx->pad_mouse = false; 1052 ictx->pad_mouse = false;
1038 1053
1039out: 1054out:
1055 if (unlock)
1056 mutex_unlock(&ictx->lock);
1057
1040 return retval; 1058 return retval;
1041} 1059}
1042 1060
@@ -2134,6 +2152,7 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf)
2134 goto rdev_setup_failed; 2152 goto rdev_setup_failed;
2135 } 2153 }
2136 2154
2155 mutex_unlock(&ictx->lock);
2137 return ictx; 2156 return ictx;
2138 2157
2139rdev_setup_failed: 2158rdev_setup_failed:
@@ -2205,6 +2224,7 @@ static struct imon_context *imon_init_intf1(struct usb_interface *intf,
2205 goto urb_submit_failed; 2224 goto urb_submit_failed;
2206 } 2225 }
2207 2226
2227 mutex_unlock(&ictx->lock);
2208 return ictx; 2228 return ictx;
2209 2229
2210urb_submit_failed: 2230urb_submit_failed:
@@ -2299,6 +2319,8 @@ static int __devinit imon_probe(struct usb_interface *interface,
2299 usb_set_intfdata(interface, ictx); 2319 usb_set_intfdata(interface, ictx);
2300 2320
2301 if (ifnum == 0) { 2321 if (ifnum == 0) {
2322 mutex_lock(&ictx->lock);
2323
2302 if (product == 0xffdc && ictx->rf_device) { 2324 if (product == 0xffdc && ictx->rf_device) {
2303 sysfs_err = sysfs_create_group(&interface->dev.kobj, 2325 sysfs_err = sysfs_create_group(&interface->dev.kobj,
2304 &imon_rf_attr_group); 2326 &imon_rf_attr_group);
@@ -2309,13 +2331,14 @@ static int __devinit imon_probe(struct usb_interface *interface,
2309 2331
2310 if (ictx->display_supported) 2332 if (ictx->display_supported)
2311 imon_init_display(ictx, interface); 2333 imon_init_display(ictx, interface);
2334
2335 mutex_unlock(&ictx->lock);
2312 } 2336 }
2313 2337
2314 dev_info(dev, "iMON device (%04x:%04x, intf%d) on " 2338 dev_info(dev, "iMON device (%04x:%04x, intf%d) on "
2315 "usb<%d:%d> initialized\n", vendor, product, ifnum, 2339 "usb<%d:%d> initialized\n", vendor, product, ifnum,
2316 usbdev->bus->busnum, usbdev->devnum); 2340 usbdev->bus->busnum, usbdev->devnum);
2317 2341
2318 mutex_unlock(&ictx->lock);
2319 mutex_unlock(&driver_lock); 2342 mutex_unlock(&driver_lock);
2320 2343
2321 return 0; 2344 return 0;
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index accaf6c9789a..43908a70bd8b 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -36,6 +36,7 @@
36#include <linux/io.h> 36#include <linux/io.h>
37#include <linux/interrupt.h> 37#include <linux/interrupt.h>
38#include <linux/sched.h> 38#include <linux/sched.h>
39#include <linux/delay.h>
39#include <linux/slab.h> 40#include <linux/slab.h>
40#include <linux/input.h> 41#include <linux/input.h>
41#include <linux/bitops.h> 42#include <linux/bitops.h>
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index 044fb7a382d6..0c273ec465c9 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -220,6 +220,8 @@ static struct usb_device_id mceusb_dev_table[] = {
220 { USB_DEVICE(VENDOR_PHILIPS, 0x206c) }, 220 { USB_DEVICE(VENDOR_PHILIPS, 0x206c) },
221 /* Philips/Spinel plus IR transceiver for ASUS */ 221 /* Philips/Spinel plus IR transceiver for ASUS */
222 { USB_DEVICE(VENDOR_PHILIPS, 0x2088) }, 222 { USB_DEVICE(VENDOR_PHILIPS, 0x2088) },
223 /* Philips IR transceiver (Dell branded) */
224 { USB_DEVICE(VENDOR_PHILIPS, 0x2093) },
223 /* Realtek MCE IR Receiver and card reader */ 225 /* Realtek MCE IR Receiver and card reader */
224 { USB_DEVICE(VENDOR_REALTEK, 0x0161), 226 { USB_DEVICE(VENDOR_REALTEK, 0x0161),
225 .driver_info = MULTIFUNCTION }, 227 .driver_info = MULTIFUNCTION },
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index f53f9c68d38d..a2706648e365 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -707,7 +707,8 @@ static void ir_close(struct input_dev *idev)
707{ 707{
708 struct rc_dev *rdev = input_get_drvdata(idev); 708 struct rc_dev *rdev = input_get_drvdata(idev);
709 709
710 rdev->close(rdev); 710 if (rdev)
711 rdev->close(rdev);
711} 712}
712 713
713/* class for /sys/class/rc */ 714/* class for /sys/class/rc */
@@ -733,6 +734,7 @@ static struct {
733 { RC_TYPE_SONY, "sony" }, 734 { RC_TYPE_SONY, "sony" },
734 { RC_TYPE_RC5_SZ, "rc-5-sz" }, 735 { RC_TYPE_RC5_SZ, "rc-5-sz" },
735 { RC_TYPE_LIRC, "lirc" }, 736 { RC_TYPE_LIRC, "lirc" },
737 { RC_TYPE_OTHER, "other" },
736}; 738};
737 739
738#define PROTO_NONE "none" 740#define PROTO_NONE "none"
diff --git a/drivers/media/video/m52790.c b/drivers/media/video/m52790.c
index 5e1c9a81984c..303ffa7df4ac 100644
--- a/drivers/media/video/m52790.c
+++ b/drivers/media/video/m52790.c
@@ -174,7 +174,7 @@ static int m52790_probe(struct i2c_client *client,
174 v4l_info(client, "chip found @ 0x%x (%s)\n", 174 v4l_info(client, "chip found @ 0x%x (%s)\n",
175 client->addr << 1, client->adapter->name); 175 client->addr << 1, client->adapter->name);
176 176
177 state = kmalloc(sizeof(struct m52790_state), GFP_KERNEL); 177 state = kzalloc(sizeof(struct m52790_state), GFP_KERNEL);
178 if (state == NULL) 178 if (state == NULL)
179 return -ENOMEM; 179 return -ENOMEM;
180 180
diff --git a/drivers/media/video/tda9840.c b/drivers/media/video/tda9840.c
index 5d4cf3b3d435..22fa8202d5ca 100644
--- a/drivers/media/video/tda9840.c
+++ b/drivers/media/video/tda9840.c
@@ -171,7 +171,7 @@ static int tda9840_probe(struct i2c_client *client,
171 v4l_info(client, "chip found @ 0x%x (%s)\n", 171 v4l_info(client, "chip found @ 0x%x (%s)\n",
172 client->addr << 1, client->adapter->name); 172 client->addr << 1, client->adapter->name);
173 173
174 sd = kmalloc(sizeof(struct v4l2_subdev), GFP_KERNEL); 174 sd = kzalloc(sizeof(struct v4l2_subdev), GFP_KERNEL);
175 if (sd == NULL) 175 if (sd == NULL)
176 return -ENOMEM; 176 return -ENOMEM;
177 v4l2_i2c_subdev_init(sd, client, &tda9840_ops); 177 v4l2_i2c_subdev_init(sd, client, &tda9840_ops);
diff --git a/drivers/media/video/tea6415c.c b/drivers/media/video/tea6415c.c
index 19621ed523ec..827425c5b866 100644
--- a/drivers/media/video/tea6415c.c
+++ b/drivers/media/video/tea6415c.c
@@ -152,7 +152,7 @@ static int tea6415c_probe(struct i2c_client *client,
152 152
153 v4l_info(client, "chip found @ 0x%x (%s)\n", 153 v4l_info(client, "chip found @ 0x%x (%s)\n",
154 client->addr << 1, client->adapter->name); 154 client->addr << 1, client->adapter->name);
155 sd = kmalloc(sizeof(struct v4l2_subdev), GFP_KERNEL); 155 sd = kzalloc(sizeof(struct v4l2_subdev), GFP_KERNEL);
156 if (sd == NULL) 156 if (sd == NULL)
157 return -ENOMEM; 157 return -ENOMEM;
158 v4l2_i2c_subdev_init(sd, client, &tea6415c_ops); 158 v4l2_i2c_subdev_init(sd, client, &tea6415c_ops);
diff --git a/drivers/media/video/tea6420.c b/drivers/media/video/tea6420.c
index 5ea840401f21..f350b6c24500 100644
--- a/drivers/media/video/tea6420.c
+++ b/drivers/media/video/tea6420.c
@@ -125,7 +125,7 @@ static int tea6420_probe(struct i2c_client *client,
125 v4l_info(client, "chip found @ 0x%x (%s)\n", 125 v4l_info(client, "chip found @ 0x%x (%s)\n",
126 client->addr << 1, client->adapter->name); 126 client->addr << 1, client->adapter->name);
127 127
128 sd = kmalloc(sizeof(struct v4l2_subdev), GFP_KERNEL); 128 sd = kzalloc(sizeof(struct v4l2_subdev), GFP_KERNEL);
129 if (sd == NULL) 129 if (sd == NULL)
130 return -ENOMEM; 130 return -ENOMEM;
131 v4l2_i2c_subdev_init(sd, client, &tea6420_ops); 131 v4l2_i2c_subdev_init(sd, client, &tea6420_ops);
diff --git a/drivers/media/video/upd64031a.c b/drivers/media/video/upd64031a.c
index f8138c75be8b..1aab96a88203 100644
--- a/drivers/media/video/upd64031a.c
+++ b/drivers/media/video/upd64031a.c
@@ -230,7 +230,7 @@ static int upd64031a_probe(struct i2c_client *client,
230 v4l_info(client, "chip found @ 0x%x (%s)\n", 230 v4l_info(client, "chip found @ 0x%x (%s)\n",
231 client->addr << 1, client->adapter->name); 231 client->addr << 1, client->adapter->name);
232 232
233 state = kmalloc(sizeof(struct upd64031a_state), GFP_KERNEL); 233 state = kzalloc(sizeof(struct upd64031a_state), GFP_KERNEL);
234 if (state == NULL) 234 if (state == NULL)
235 return -ENOMEM; 235 return -ENOMEM;
236 sd = &state->sd; 236 sd = &state->sd;
diff --git a/drivers/media/video/upd64083.c b/drivers/media/video/upd64083.c
index 28e0e6b6ca84..9bbe61700fd5 100644
--- a/drivers/media/video/upd64083.c
+++ b/drivers/media/video/upd64083.c
@@ -202,7 +202,7 @@ static int upd64083_probe(struct i2c_client *client,
202 v4l_info(client, "chip found @ 0x%x (%s)\n", 202 v4l_info(client, "chip found @ 0x%x (%s)\n",
203 client->addr << 1, client->adapter->name); 203 client->addr << 1, client->adapter->name);
204 204
205 state = kmalloc(sizeof(struct upd64083_state), GFP_KERNEL); 205 state = kzalloc(sizeof(struct upd64083_state), GFP_KERNEL);
206 if (state == NULL) 206 if (state == NULL)
207 return -ENOMEM; 207 return -ENOMEM;
208 sd = &state->sd; 208 sd = &state->sd;