diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-11-08 21:37:32 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 07:56:18 -0800 |
commit | d5e5265315770bda46c50ecaa64e2b9790f2064c (patch) | |
tree | 5c92fa1125dee3f766bd06f18840ce78bf0cd861 /drivers/media/video/em28xx/em28xx-video.c | |
parent | da45a2a5b96afd7188c058a55eb2917d6524c0cf (diff) | |
download | blackbird-op-linux-d5e5265315770bda46c50ecaa64e2b9790f2064c.tar.gz blackbird-op-linux-d5e5265315770bda46c50ecaa64e2b9790f2064c.zip |
[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.c | 15 |
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 @@ #include <linux/kernel.h> #include <linux/usb.h> #include <linux/i2c.h> -#include <media/tuner.h> #include <linux/video_decoder.h> #include "em2820.h" +#include <media/tuner.h> #define DRIVER_AUTHOR "Markus Rechberger <mrechberger@gmail.com>, " \ "Ludovico Cavedon <cavedon@sssup.it>, " \ @@ -1699,15 +1699,22 @@ static int em2820_usb_probe(struct usb_interface *interface, struct usb_device *udev; struct em2820 *dev = NULL; int retval = -ENODEV; - int model,i,nr; + int model,i,nr,ifnum; udev = usb_get_dev(interface_to_usbdev(interface)); - endpoint = &interface->cur_altsetting->endpoint[1].desc; + ifnum = interface->altsetting[0].desc.bInterfaceNumber; + + em2820_err(DRIVER_NAME " new device (%04x:%04x): interface %i, class %i\n", + udev->descriptor.idVendor,udev->descriptor.idProduct, + ifnum, + interface->altsetting[0].desc.bInterfaceClass); /* Don't register audio interfaces */ - if (interface->altsetting[1].desc.bInterfaceClass == USB_CLASS_AUDIO) + if (interface->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) return -ENODEV; + endpoint = &interface->cur_altsetting->endpoint[1].desc; + /* check if the the device has the iso in endpoint at the correct place */ if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_ISOC) { |