aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-11-09 00:37:32 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 10:56:18 -0500
commitd5e5265315770bda46c50ecaa64e2b9790f2064c (patch)
tree5c92fa1125dee3f766bd06f18840ce78bf0cd861 /drivers/media/video/em28xx/em28xx-video.c
parentda45a2a5b96afd7188c058a55eb2917d6524c0cf (diff)
[PATCH] v4l: 784: several improvement on i2c ir handling for em2820
- Several Improvement on I2C IR handling for em2820: - moved Pinnacle IR table (ir_codes_em2820) to em2820-input.c - IR struct renamed and moved to a header file. - New file to handle em2820-specific IR. - Some cleanups. - attach now detects I2C IR and calls em2820-specific IR code - IR compat code moved to compat.h - New header with struct IR_i2c there, to allow it to be used by board-specific input handlers. - Some improvements at em28xx board detection: - Board detection message improved to show interface and class. - Now it doesn't touch audio interfaces. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index d3a959b9ee64..f3fc44b352b4 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -28,10 +28,10 @@
28#include <linux/kernel.h> 28#include <linux/kernel.h>
29#include <linux/usb.h> 29#include <linux/usb.h>
30#include <linux/i2c.h> 30#include <linux/i2c.h>
31#include <media/tuner.h>
32#include <linux/video_decoder.h> 31#include <linux/video_decoder.h>
33 32
34#include "em2820.h" 33#include "em2820.h"
34#include <media/tuner.h>
35 35
36#define DRIVER_AUTHOR "Markus Rechberger <mrechberger@gmail.com>, " \ 36#define DRIVER_AUTHOR "Markus Rechberger <mrechberger@gmail.com>, " \
37 "Ludovico Cavedon <cavedon@sssup.it>, " \ 37 "Ludovico Cavedon <cavedon@sssup.it>, " \
@@ -1699,15 +1699,22 @@ static int em2820_usb_probe(struct usb_interface *interface,
1699 struct usb_device *udev; 1699 struct usb_device *udev;
1700 struct em2820 *dev = NULL; 1700 struct em2820 *dev = NULL;
1701 int retval = -ENODEV; 1701 int retval = -ENODEV;
1702 int model,i,nr; 1702 int model,i,nr,ifnum;
1703 1703
1704 udev = usb_get_dev(interface_to_usbdev(interface)); 1704 udev = usb_get_dev(interface_to_usbdev(interface));
1705 endpoint = &interface->cur_altsetting->endpoint[1].desc; 1705 ifnum = interface->altsetting[0].desc.bInterfaceNumber;
1706
1707 em2820_err(DRIVER_NAME " new device (%04x:%04x): interface %i, class %i\n",
1708 udev->descriptor.idVendor,udev->descriptor.idProduct,
1709 ifnum,
1710 interface->altsetting[0].desc.bInterfaceClass);
1706 1711
1707 /* Don't register audio interfaces */ 1712 /* Don't register audio interfaces */
1708 if (interface->altsetting[1].desc.bInterfaceClass == USB_CLASS_AUDIO) 1713 if (interface->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO)
1709 return -ENODEV; 1714 return -ENODEV;
1710 1715
1716 endpoint = &interface->cur_altsetting->endpoint[1].desc;
1717
1711 /* check if the the device has the iso in endpoint at the correct place */ 1718 /* check if the the device has the iso in endpoint at the correct place */
1712 if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != 1719 if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) !=
1713 USB_ENDPOINT_XFER_ISOC) { 1720 USB_ENDPOINT_XFER_ISOC) {