Skip to content

Commit

Permalink
Merge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/mchehab/linux-2.6

* 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (87 commits)
  V4L/DVB: ivtv: Timing tweaks and code re-order to try and improve stability
  V4L/DVB: ivtv: Avoid accidental video standard change
  V4L/DVB: ivtvfb : Module load / unload fixes
  V4L/DVB: cx2341x: Report correct temporal setting for log-status
  V4L/DVB: cx18, cx23885, v4l2 doc, MAINTAINERS: Update Andy Walls' email address
  V4L/DVB: drivers/media: Eliminate a NULL pointer dereference
  V4L/DVB: dvb-core: Fix ULE decapsulation bug
  V4L/DVB: Bug fix: make IR work again for dm1105
  V4L/DVB: media/IR: nec-decoder needs to select BITREV
  V4L/DVB: video/saa7134: change dprintk() to i2cdprintk()
  V4L/DVB: video/saa7134: remove duplicate break
  V4L/DVB: IR/imon: add auto-config for 0xffdc rf device
  V4L/DVB: IR/imon: clean up usage of bools
  V4L/DVB: em28xx: remove unneeded null checks
  V4L/DVB: ngene: remove unused #include <linux/version.h>
  V4L/DVB: ak881x needs slab.h
  V4L/DVB: FusionHDTV: Use quick reads for I2C IR device probing
  V4L/DVB: Technotrend S2-3200 ships with a TT 1500 remote
  V4L/DVB: drivers/media: Use kzalloc
  V4L/DVB: m920x: Select simple tuner
  ...
  • Loading branch information
torvalds committed Jun 4, 2010
2 parents d2dd328 + 666092c commit e620d1e
Show file tree
Hide file tree
Showing 139 changed files with 2,104 additions and 1,581 deletions.
2 changes: 1 addition & 1 deletion Documentation/DocBook/v4l/v4l2.xml
Expand Up @@ -58,7 +58,7 @@ MPEG stream embedded, sliced VBI data format in this specification.
</contrib>
<affiliation>
<address>
<email>awalls@radix.net</email>
<email>awalls@md.metrocast.net</email>
</address>
</affiliation>
</author>
Expand Down
6 changes: 4 additions & 2 deletions Documentation/DocBook/v4l/vidioc-query-dv-preset.xml
Expand Up @@ -53,8 +53,10 @@ input</refpurpose>
automatically, similar to sensing the video standard. To do so, applications
call <constant> VIDIOC_QUERY_DV_PRESET</constant> with a pointer to a
&v4l2-dv-preset; type. Once the hardware detects a preset, that preset is
returned in the preset field of &v4l2-dv-preset;. When detection is not
possible or fails, the value V4L2_DV_INVALID is returned.</para>
returned in the preset field of &v4l2-dv-preset;. If the preset could not be
detected because there was no signal, or the signal was unreliable, or the
signal did not map to a supported preset, then the value V4L2_DV_INVALID is
returned.</para>
</refsect1>

<refsect1>
Expand Down
5 changes: 3 additions & 2 deletions Documentation/video4linux/CARDLIST.saa7134
Expand Up @@ -176,5 +176,6 @@
175 -> Leadtek Winfast DTV1000S [107d:6655]
176 -> Beholder BeholdTV 505 RDS [0000:5051]
177 -> Hawell HW-404M7
179 -> Beholder BeholdTV H7 [5ace:7190]
180 -> Beholder BeholdTV A7 [5ace:7090]
178 -> Beholder BeholdTV H7 [5ace:7190]
179 -> Beholder BeholdTV A7 [5ace:7090]
180 -> Avermedia M733A [1461:4155,1461:4255]
1 change: 1 addition & 0 deletions Documentation/video4linux/gspca.txt
Expand Up @@ -290,6 +290,7 @@ sonixb 0c45:602e Genius VideoCam Messenger
sonixj 0c45:6040 Speed NVC 350K
sonixj 0c45:607c Sonix sn9c102p Hv7131R
sonixj 0c45:60c0 Sangha Sn535
sonixj 0c45:60ce USB-PC-Camera-168 (TALK-5067)
sonixj 0c45:60ec SN9C105+MO4000
sonixj 0c45:60fb Surfer NoName
sonixj 0c45:60fc LG-LIC300
Expand Down
4 changes: 2 additions & 2 deletions MAINTAINERS
Expand Up @@ -1731,7 +1731,7 @@ S: Maintained
F: sound/pci/cs5535audio/

CX18 VIDEO4LINUX DRIVER
M: Andy Walls <awalls@radix.net>
M: Andy Walls <awalls@md.metrocast.net>
L: ivtv-devel@ivtvdriver.org (moderated for non-subscribers)
L: linux-media@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
Expand Down Expand Up @@ -3165,7 +3165,7 @@ F: Documentation/hwmon/it87
F: drivers/hwmon/it87.c

IVTV VIDEO4LINUX DRIVER
M: Andy Walls <awalls@radix.net>
M: Andy Walls <awalls@md.metrocast.net>
L: ivtv-devel@ivtvdriver.org (moderated for non-subscribers)
L: linux-media@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/IR/Kconfig
Expand Up @@ -13,6 +13,7 @@ source "drivers/media/IR/keymaps/Kconfig"
config IR_NEC_DECODER
tristate "Enable IR raw decoder for the NEC protocol"
depends on IR_CORE
select BITREVERSE
default y

---help---
Expand All @@ -22,6 +23,7 @@ config IR_NEC_DECODER
config IR_RC5_DECODER
tristate "Enable IR raw decoder for the RC-5 protocol"
depends on IR_CORE
select BITREVERSE
default y

---help---
Expand Down
75 changes: 41 additions & 34 deletions drivers/media/IR/imon.c
Expand Up @@ -94,6 +94,7 @@ struct imon_context {

bool display_supported; /* not all controllers do */
bool display_isopen; /* display port has been opened */
bool rf_device; /* true if iMON 2.4G LT/DT RF device */
bool rf_isassociating; /* RF remote associating */
bool dev_present_intf0; /* USB device presence, interface 0 */
bool dev_present_intf1; /* USB device presence, interface 1 */
Expand Down Expand Up @@ -385,7 +386,7 @@ static int display_open(struct inode *inode, struct file *file)
err("%s: display port is already open", __func__);
retval = -EBUSY;
} else {
ictx->display_isopen = 1;
ictx->display_isopen = true;
file->private_data = ictx;
dev_dbg(ictx->dev, "display port opened\n");
}
Expand Down Expand Up @@ -422,7 +423,7 @@ static int display_close(struct inode *inode, struct file *file)
err("%s: display is not open", __func__);
retval = -EIO;
} else {
ictx->display_isopen = 0;
ictx->display_isopen = false;
dev_dbg(ictx->dev, "display port closed\n");
if (!ictx->dev_present_intf0) {
/*
Expand Down Expand Up @@ -491,12 +492,12 @@ static int send_packet(struct imon_context *ictx)
}

init_completion(&ictx->tx.finished);
ictx->tx.busy = 1;
ictx->tx.busy = true;
smp_rmb(); /* ensure later readers know we're busy */

retval = usb_submit_urb(ictx->tx_urb, GFP_KERNEL);
if (retval) {
ictx->tx.busy = 0;
ictx->tx.busy = false;
smp_rmb(); /* ensure later readers know we're not busy */
err("%s: error submitting urb(%d)", __func__, retval);
} else {
Expand Down Expand Up @@ -682,7 +683,7 @@ static ssize_t store_associate_remote(struct device *d,
return -ENODEV;

mutex_lock(&ictx->lock);
ictx->rf_isassociating = 1;
ictx->rf_isassociating = true;
send_associate_24g(ictx);
mutex_unlock(&ictx->lock);

Expand Down Expand Up @@ -950,7 +951,7 @@ static void usb_tx_callback(struct urb *urb)
ictx->tx.status = urb->status;

/* notify waiters that write has finished */
ictx->tx.busy = 0;
ictx->tx.busy = false;
smp_rmb(); /* ensure later readers know we're not busy */
complete(&ictx->tx.finished);
}
Expand Down Expand Up @@ -1215,7 +1216,7 @@ static bool imon_mouse_event(struct imon_context *ictx,
{
char rel_x = 0x00, rel_y = 0x00;
u8 right_shift = 1;
bool mouse_input = 1;
bool mouse_input = true;
int dir = 0;

/* newer iMON device PAD or mouse button */
Expand Down Expand Up @@ -1246,7 +1247,7 @@ static bool imon_mouse_event(struct imon_context *ictx,
} else if (ictx->kc == KEY_CHANNELDOWN && (buf[2] & 0x40) != 0x40) {
dir = -1;
} else
mouse_input = 0;
mouse_input = false;

if (mouse_input) {
dev_dbg(ictx->dev, "sending mouse data via input subsystem\n");
Expand Down Expand Up @@ -1450,7 +1451,7 @@ static void imon_incoming_packet(struct imon_context *ictx,
unsigned char *buf = urb->transfer_buffer;
struct device *dev = ictx->dev;
u32 kc;
bool norelease = 0;
bool norelease = false;
int i;
u64 temp_key;
u64 panel_key = 0;
Expand All @@ -1465,7 +1466,7 @@ static void imon_incoming_packet(struct imon_context *ictx,
idev = ictx->idev;

/* filter out junk data on the older 0xffdc imon devices */
if ((buf[0] == 0xff) && (buf[7] == 0xff))
if ((buf[0] == 0xff) && (buf[1] == 0xff) && (buf[2] == 0xff))
return;

/* Figure out what key was pressed */
Expand Down Expand Up @@ -1517,7 +1518,7 @@ static void imon_incoming_packet(struct imon_context *ictx,
!(buf[1] & 0x1 || buf[1] >> 2 & 0x1))) {
len = 8;
imon_pad_to_keys(ictx, buf);
norelease = 1;
norelease = true;
}

if (debug) {
Expand Down Expand Up @@ -1580,7 +1581,7 @@ static void imon_incoming_packet(struct imon_context *ictx,
(buf[6] == 0x5E && buf[7] == 0xDF))) { /* DT */
dev_warn(dev, "%s: remote associated refid=%02X\n",
__func__, buf[1]);
ictx->rf_isassociating = 0;
ictx->rf_isassociating = false;
}
}

Expand Down Expand Up @@ -1790,9 +1791,9 @@ static bool imon_find_endpoints(struct imon_context *ictx,
int ifnum = iface_desc->desc.bInterfaceNumber;
int num_endpts = iface_desc->desc.bNumEndpoints;
int i, ep_dir, ep_type;
bool ir_ep_found = 0;
bool display_ep_found = 0;
bool tx_control = 0;
bool ir_ep_found = false;
bool display_ep_found = false;
bool tx_control = false;

/*
* Scan the endpoint list and set:
Expand All @@ -1808,13 +1809,13 @@ static bool imon_find_endpoints(struct imon_context *ictx,
ep_type == USB_ENDPOINT_XFER_INT) {

rx_endpoint = ep;
ir_ep_found = 1;
ir_ep_found = true;
dev_dbg(ictx->dev, "%s: found IR endpoint\n", __func__);

} else if (!display_ep_found && ep_dir == USB_DIR_OUT &&
ep_type == USB_ENDPOINT_XFER_INT) {
tx_endpoint = ep;
display_ep_found = 1;
display_ep_found = true;
dev_dbg(ictx->dev, "%s: found display endpoint\n", __func__);
}
}
Expand All @@ -1835,8 +1836,8 @@ static bool imon_find_endpoints(struct imon_context *ictx,
* newer iMON devices that use control urb instead of interrupt
*/
if (!display_ep_found) {
tx_control = 1;
display_ep_found = 1;
tx_control = true;
display_ep_found = true;
dev_dbg(ictx->dev, "%s: device uses control endpoint, not "
"interface OUT endpoint\n", __func__);
}
Expand All @@ -1847,7 +1848,7 @@ static bool imon_find_endpoints(struct imon_context *ictx,
* and without... :\
*/
if (ictx->display_type == IMON_DISPLAY_TYPE_NONE) {
display_ep_found = 0;
display_ep_found = false;
dev_dbg(ictx->dev, "%s: device has no display\n", __func__);
}

Expand All @@ -1856,7 +1857,7 @@ static bool imon_find_endpoints(struct imon_context *ictx,
* that refers to e.g. /dev/lcd0 (a character device LCD or VFD).
*/
if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) {
display_ep_found = 0;
display_ep_found = false;
dev_dbg(ictx->dev, "%s: iMON Touch device found\n", __func__);
}

Expand Down Expand Up @@ -1905,9 +1906,10 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf)

ictx->dev = dev;
ictx->usbdev_intf0 = usb_get_dev(interface_to_usbdev(intf));
ictx->dev_present_intf0 = 1;
ictx->dev_present_intf0 = true;
ictx->rx_urb_intf0 = rx_urb;
ictx->tx_urb = tx_urb;
ictx->rf_device = false;

ictx->vendor = le16_to_cpu(ictx->usbdev_intf0->descriptor.idVendor);
ictx->product = le16_to_cpu(ictx->usbdev_intf0->descriptor.idProduct);
Expand Down Expand Up @@ -1979,7 +1981,7 @@ static struct imon_context *imon_init_intf1(struct usb_interface *intf,
}

ictx->usbdev_intf1 = usb_get_dev(interface_to_usbdev(intf));
ictx->dev_present_intf1 = 1;
ictx->dev_present_intf1 = true;
ictx->rx_urb_intf1 = rx_urb;

ret = -ENODEV;
Expand Down Expand Up @@ -2047,6 +2049,12 @@ static void imon_get_ffdc_type(struct imon_context *ictx)
dev_info(ictx->dev, "0xffdc iMON Knob, iMON IR");
ictx->display_supported = false;
break;
/* iMON 2.4G LT (usb stick), no display, iMON RF */
case 0x4e:
dev_info(ictx->dev, "0xffdc iMON 2.4G LT, iMON RF");
ictx->display_supported = false;
ictx->rf_device = true;
break;
/* iMON VFD, no IR (does have vol knob tho) */
case 0x35:
dev_info(ictx->dev, "0xffdc iMON VFD + knob, no IR");
Expand Down Expand Up @@ -2197,15 +2205,6 @@ static int __devinit imon_probe(struct usb_interface *interface,
goto fail;
}

if (product == 0xffdc) {
/* RF products *also* use 0xffdc... sigh... */
sysfs_err = sysfs_create_group(&interface->dev.kobj,
&imon_rf_attribute_group);
if (sysfs_err)
err("%s: Could not create RF sysfs entries(%d)",
__func__, sysfs_err);
}

} else {
/* this is the secondary interface on the device */
ictx = imon_init_intf1(interface, first_if_ctx);
Expand Down Expand Up @@ -2233,6 +2232,14 @@ static int __devinit imon_probe(struct usb_interface *interface,

imon_set_display_type(ictx, interface);

if (product == 0xffdc && ictx->rf_device) {
sysfs_err = sysfs_create_group(&interface->dev.kobj,
&imon_rf_attribute_group);
if (sysfs_err)
err("%s: Could not create RF sysfs entries(%d)",
__func__, sysfs_err);
}

if (ictx->display_supported)
imon_init_display(ictx, interface);
}
Expand Down Expand Up @@ -2297,7 +2304,7 @@ static void __devexit imon_disconnect(struct usb_interface *interface)
}

if (ifnum == 0) {
ictx->dev_present_intf0 = 0;
ictx->dev_present_intf0 = false;
usb_kill_urb(ictx->rx_urb_intf0);
input_unregister_device(ictx->idev);
if (ictx->display_supported) {
Expand All @@ -2307,7 +2314,7 @@ static void __devexit imon_disconnect(struct usb_interface *interface)
usb_deregister_dev(interface, &imon_vfd_class);
}
} else {
ictx->dev_present_intf1 = 0;
ictx->dev_present_intf1 = false;
usb_kill_urb(ictx->rx_urb_intf1);
if (ictx->display_type == IMON_DISPLAY_TYPE_VGA)
input_unregister_device(ictx->touch);
Expand Down
17 changes: 10 additions & 7 deletions drivers/media/IR/ir-keytable.c
Expand Up @@ -490,11 +490,12 @@ int __ir_input_register(struct input_dev *input_dev,
if (rc < 0)
goto out_table;

if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW) {
rc = ir_raw_event_register(input_dev);
if (rc < 0)
goto out_event;
}
if (ir_dev->props)
if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW) {
rc = ir_raw_event_register(input_dev);
if (rc < 0)
goto out_event;
}

IR_dprintk(1, "Registered input device on %s for %s remote.\n",
driver_name, rc_tab->name);
Expand Down Expand Up @@ -530,8 +531,10 @@ void ir_input_unregister(struct input_dev *input_dev)
IR_dprintk(1, "Freed keycode table\n");

del_timer_sync(&ir_dev->timer_keyup);
if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW)
ir_raw_event_unregister(input_dev);
if (ir_dev->props)
if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW)
ir_raw_event_unregister(input_dev);

rc_tab = &ir_dev->rc_tab;
rc_tab->size = 0;
kfree(rc_tab->scan);
Expand Down
7 changes: 4 additions & 3 deletions drivers/media/IR/ir-sysfs.c
Expand Up @@ -221,9 +221,10 @@ int ir_register_class(struct input_dev *input_dev)
if (unlikely(devno < 0))
return devno;

if (ir_dev->props->driver_type == RC_DRIVER_SCANCODE)
ir_dev->dev.type = &rc_dev_type;
else
if (ir_dev->props) {
if (ir_dev->props->driver_type == RC_DRIVER_SCANCODE)
ir_dev->dev.type = &rc_dev_type;
} else
ir_dev->dev.type = &ir_raw_dev_type;

ir_dev->dev.class = &ir_input_class;
Expand Down
3 changes: 2 additions & 1 deletion drivers/media/IR/keymaps/Makefile
Expand Up @@ -6,7 +6,8 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-avermedia.o \
rc-avermedia-cardbus.o \
rc-avermedia-dvbt.o \
rc-avermedia-m135a-rm-jx.o \
rc-avermedia-m135a.o \
rc-avermedia-m733a-rm-k6.o \
rc-avertv-303.o \
rc-behold.o \
rc-behold-columbus.o \
Expand Down

0 comments on commit e620d1e

Please sign in to comment.