Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: [media] ngene: Fix CI data transfer regression Fix CI data transfer regression introduced by previous cleanup. [media] v4l: make sure drivers supply a zeroed struct v4l2_subdev [media] Missing frontend config for LME DM04/QQBOX [media] rc_core: avoid kernel oops when rmmod saa7134 [media] imon: add conditional locking in change_protocol [media] rc: show RC_TYPE_OTHER in sysfs [media] ite-cir: modular build on ppc requires delay.h include [media] mceusb: add Dell transceiver ID
This commit is contained in:
Коммит
1c08232cfe
|
@ -356,6 +356,8 @@ config DVB_USB_LME2510
|
|||
select DVB_TDA826X if !DVB_FE_CUSTOMISE
|
||||
select DVB_STV0288 if !DVB_FE_CUSTOMISE
|
||||
select DVB_IX2505V if !DVB_FE_CUSTOMISE
|
||||
select DVB_STV0299 if !DVB_FE_CUSTOMISE
|
||||
select DVB_PLL if !DVB_FE_CUSTOMISE
|
||||
help
|
||||
Say Y here to support the LME DM04/QQBOX DVB-S USB2.0 .
|
||||
|
||||
|
|
|
@ -1520,6 +1520,7 @@ static int init_channel(struct ngene_channel *chan)
|
|||
if (dev->ci.en && (io & NGENE_IO_TSOUT)) {
|
||||
dvb_ca_en50221_init(adapter, dev->ci.en, 0, 1);
|
||||
set_transfer(chan, 1);
|
||||
chan->dev->channel[2].DataFormatFlags = DF_SWAP32;
|
||||
set_transfer(&chan->dev->channel[2], 1);
|
||||
dvb_register_device(adapter, &chan->ci_dev,
|
||||
&ngene_dvbdev_ci, (void *) chan,
|
||||
|
|
|
@ -376,7 +376,7 @@ static int __devinit saa7706h_probe(struct i2c_client *client,
|
|||
v4l_info(client, "chip found @ 0x%02x (%s)\n",
|
||||
client->addr << 1, client->adapter->name);
|
||||
|
||||
state = kmalloc(sizeof(struct saa7706h_state), GFP_KERNEL);
|
||||
state = kzalloc(sizeof(struct saa7706h_state), GFP_KERNEL);
|
||||
if (state == NULL)
|
||||
return -ENOMEM;
|
||||
sd = &state->sd;
|
||||
|
|
|
@ -176,7 +176,7 @@ static int __devinit tef6862_probe(struct i2c_client *client,
|
|||
v4l_info(client, "chip found @ 0x%02x (%s)\n",
|
||||
client->addr << 1, client->adapter->name);
|
||||
|
||||
state = kmalloc(sizeof(struct tef6862_state), GFP_KERNEL);
|
||||
state = kzalloc(sizeof(struct tef6862_state), GFP_KERNEL);
|
||||
if (state == NULL)
|
||||
return -ENOMEM;
|
||||
state->freq = TEF6862_LO_FREQ;
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#define MOD_AUTHOR "Jarod Wilson <jarod@wilsonet.com>"
|
||||
#define MOD_DESC "Driver for SoundGraph iMON MultiMedia IR/Display"
|
||||
#define MOD_NAME "imon"
|
||||
#define MOD_VERSION "0.9.2"
|
||||
#define MOD_VERSION "0.9.3"
|
||||
|
||||
#define DISPLAY_MINOR_BASE 144
|
||||
#define DEVICE_NAME "lcd%d"
|
||||
|
@ -460,8 +460,9 @@ static int display_close(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
/**
|
||||
* Sends a packet to the device -- this function must be called
|
||||
* with ictx->lock held.
|
||||
* Sends a packet to the device -- this function must be called with
|
||||
* ictx->lock held, or its unlock/lock sequence while waiting for tx
|
||||
* to complete can/will lead to a deadlock.
|
||||
*/
|
||||
static int send_packet(struct imon_context *ictx)
|
||||
{
|
||||
|
@ -991,12 +992,21 @@ static void imon_touch_display_timeout(unsigned long data)
|
|||
* the iMON remotes, and those used by the Windows MCE remotes (which is
|
||||
* really just RC-6), but only one or the other at a time, as the signals
|
||||
* are decoded onboard the receiver.
|
||||
*
|
||||
* This function gets called two different ways, one way is from
|
||||
* rc_register_device, for initial protocol selection/setup, and the other is
|
||||
* via a userspace-initiated protocol change request, either by direct sysfs
|
||||
* prodding or by something like ir-keytable. In the rc_register_device case,
|
||||
* the imon context lock is already held, but when initiated from userspace,
|
||||
* it is not, so we must acquire it prior to calling send_packet, which
|
||||
* requires that the lock is held.
|
||||
*/
|
||||
static int imon_ir_change_protocol(struct rc_dev *rc, u64 rc_type)
|
||||
{
|
||||
int retval;
|
||||
struct imon_context *ictx = rc->priv;
|
||||
struct device *dev = ictx->dev;
|
||||
bool unlock = false;
|
||||
unsigned char ir_proto_packet[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 };
|
||||
|
||||
|
@ -1029,6 +1039,11 @@ static int imon_ir_change_protocol(struct rc_dev *rc, u64 rc_type)
|
|||
|
||||
memcpy(ictx->usb_tx_buf, &ir_proto_packet, sizeof(ir_proto_packet));
|
||||
|
||||
if (!mutex_is_locked(&ictx->lock)) {
|
||||
unlock = true;
|
||||
mutex_lock(&ictx->lock);
|
||||
}
|
||||
|
||||
retval = send_packet(ictx);
|
||||
if (retval)
|
||||
goto out;
|
||||
|
@ -1037,6 +1052,9 @@ static int imon_ir_change_protocol(struct rc_dev *rc, u64 rc_type)
|
|||
ictx->pad_mouse = false;
|
||||
|
||||
out:
|
||||
if (unlock)
|
||||
mutex_unlock(&ictx->lock);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -2134,6 +2152,7 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf)
|
|||
goto rdev_setup_failed;
|
||||
}
|
||||
|
||||
mutex_unlock(&ictx->lock);
|
||||
return ictx;
|
||||
|
||||
rdev_setup_failed:
|
||||
|
@ -2205,6 +2224,7 @@ static struct imon_context *imon_init_intf1(struct usb_interface *intf,
|
|||
goto urb_submit_failed;
|
||||
}
|
||||
|
||||
mutex_unlock(&ictx->lock);
|
||||
return ictx;
|
||||
|
||||
urb_submit_failed:
|
||||
|
@ -2299,6 +2319,8 @@ static int __devinit imon_probe(struct usb_interface *interface,
|
|||
usb_set_intfdata(interface, ictx);
|
||||
|
||||
if (ifnum == 0) {
|
||||
mutex_lock(&ictx->lock);
|
||||
|
||||
if (product == 0xffdc && ictx->rf_device) {
|
||||
sysfs_err = sysfs_create_group(&interface->dev.kobj,
|
||||
&imon_rf_attr_group);
|
||||
|
@ -2309,13 +2331,14 @@ static int __devinit imon_probe(struct usb_interface *interface,
|
|||
|
||||
if (ictx->display_supported)
|
||||
imon_init_display(ictx, interface);
|
||||
|
||||
mutex_unlock(&ictx->lock);
|
||||
}
|
||||
|
||||
dev_info(dev, "iMON device (%04x:%04x, intf%d) on "
|
||||
"usb<%d:%d> initialized\n", vendor, product, ifnum,
|
||||
usbdev->bus->busnum, usbdev->devnum);
|
||||
|
||||
mutex_unlock(&ictx->lock);
|
||||
mutex_unlock(&driver_lock);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/bitops.h>
|
||||
|
|
|
@ -220,6 +220,8 @@ static struct usb_device_id mceusb_dev_table[] = {
|
|||
{ USB_DEVICE(VENDOR_PHILIPS, 0x206c) },
|
||||
/* Philips/Spinel plus IR transceiver for ASUS */
|
||||
{ USB_DEVICE(VENDOR_PHILIPS, 0x2088) },
|
||||
/* Philips IR transceiver (Dell branded) */
|
||||
{ USB_DEVICE(VENDOR_PHILIPS, 0x2093) },
|
||||
/* Realtek MCE IR Receiver and card reader */
|
||||
{ USB_DEVICE(VENDOR_REALTEK, 0x0161),
|
||||
.driver_info = MULTIFUNCTION },
|
||||
|
|
|
@ -707,7 +707,8 @@ static void ir_close(struct input_dev *idev)
|
|||
{
|
||||
struct rc_dev *rdev = input_get_drvdata(idev);
|
||||
|
||||
rdev->close(rdev);
|
||||
if (rdev)
|
||||
rdev->close(rdev);
|
||||
}
|
||||
|
||||
/* class for /sys/class/rc */
|
||||
|
@ -733,6 +734,7 @@ static struct {
|
|||
{ RC_TYPE_SONY, "sony" },
|
||||
{ RC_TYPE_RC5_SZ, "rc-5-sz" },
|
||||
{ RC_TYPE_LIRC, "lirc" },
|
||||
{ RC_TYPE_OTHER, "other" },
|
||||
};
|
||||
|
||||
#define PROTO_NONE "none"
|
||||
|
|
|
@ -174,7 +174,7 @@ static int m52790_probe(struct i2c_client *client,
|
|||
v4l_info(client, "chip found @ 0x%x (%s)\n",
|
||||
client->addr << 1, client->adapter->name);
|
||||
|
||||
state = kmalloc(sizeof(struct m52790_state), GFP_KERNEL);
|
||||
state = kzalloc(sizeof(struct m52790_state), GFP_KERNEL);
|
||||
if (state == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ static int tda9840_probe(struct i2c_client *client,
|
|||
v4l_info(client, "chip found @ 0x%x (%s)\n",
|
||||
client->addr << 1, client->adapter->name);
|
||||
|
||||
sd = kmalloc(sizeof(struct v4l2_subdev), GFP_KERNEL);
|
||||
sd = kzalloc(sizeof(struct v4l2_subdev), GFP_KERNEL);
|
||||
if (sd == NULL)
|
||||
return -ENOMEM;
|
||||
v4l2_i2c_subdev_init(sd, client, &tda9840_ops);
|
||||
|
|
|
@ -152,7 +152,7 @@ static int tea6415c_probe(struct i2c_client *client,
|
|||
|
||||
v4l_info(client, "chip found @ 0x%x (%s)\n",
|
||||
client->addr << 1, client->adapter->name);
|
||||
sd = kmalloc(sizeof(struct v4l2_subdev), GFP_KERNEL);
|
||||
sd = kzalloc(sizeof(struct v4l2_subdev), GFP_KERNEL);
|
||||
if (sd == NULL)
|
||||
return -ENOMEM;
|
||||
v4l2_i2c_subdev_init(sd, client, &tea6415c_ops);
|
||||
|
|
|
@ -125,7 +125,7 @@ static int tea6420_probe(struct i2c_client *client,
|
|||
v4l_info(client, "chip found @ 0x%x (%s)\n",
|
||||
client->addr << 1, client->adapter->name);
|
||||
|
||||
sd = kmalloc(sizeof(struct v4l2_subdev), GFP_KERNEL);
|
||||
sd = kzalloc(sizeof(struct v4l2_subdev), GFP_KERNEL);
|
||||
if (sd == NULL)
|
||||
return -ENOMEM;
|
||||
v4l2_i2c_subdev_init(sd, client, &tea6420_ops);
|
||||
|
|
|
@ -230,7 +230,7 @@ static int upd64031a_probe(struct i2c_client *client,
|
|||
v4l_info(client, "chip found @ 0x%x (%s)\n",
|
||||
client->addr << 1, client->adapter->name);
|
||||
|
||||
state = kmalloc(sizeof(struct upd64031a_state), GFP_KERNEL);
|
||||
state = kzalloc(sizeof(struct upd64031a_state), GFP_KERNEL);
|
||||
if (state == NULL)
|
||||
return -ENOMEM;
|
||||
sd = &state->sd;
|
||||
|
|
|
@ -202,7 +202,7 @@ static int upd64083_probe(struct i2c_client *client,
|
|||
v4l_info(client, "chip found @ 0x%x (%s)\n",
|
||||
client->addr << 1, client->adapter->name);
|
||||
|
||||
state = kmalloc(sizeof(struct upd64083_state), GFP_KERNEL);
|
||||
state = kzalloc(sizeof(struct upd64083_state), GFP_KERNEL);
|
||||
if (state == NULL)
|
||||
return -ENOMEM;
|
||||
sd = &state->sd;
|
||||
|
|
Загрузка…
Ссылка в новой задаче