From defa3edd60084d83303b9d17251493ad3da486c8 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 3 Sep 2008 09:49:20 +0100 Subject: backport commit aa7a7fb3990ffc74945494cbd2fc6e920825ee2c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Mauro Carvalho Chehab Author: David Woodhouse Define and use PCI_DEVICE_ID_MARVELL_88ALP01_CCIC for CAFÉ camera driver Also, stop looking at the NAND controller (0x4100) and checking the device class. For a while during development, all three functions on the chip had the same ID. We made them fix that fairly promptly, and we can forget about it now. Priority: normal Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cafe_ccic.c | 13 +++---------- v4l/compat.h | 4 ++++ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/linux/drivers/media/video/cafe_ccic.c b/linux/drivers/media/video/cafe_ccic.c index 1c41a4aea..6aba16f85 100644 --- a/linux/drivers/media/video/cafe_ccic.c +++ b/linux/drivers/media/video/cafe_ccic.c @@ -2103,15 +2103,8 @@ static int cafe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) { int ret; - u16 classword; struct cafe_camera *cam; - /* - * Make sure we have a camera here - we'll get calls for - * the other cafe devices as well. - */ - pci_read_config_word(pdev, PCI_CLASS_DEVICE, &classword); - if (classword != PCI_CLASS_MULTIMEDIA_VIDEO) - return -ENODEV; + /* * Start putting together one of our big camera structures. */ @@ -2299,8 +2292,8 @@ static int cafe_pci_resume(struct pci_dev *pdev) static struct pci_device_id cafe_ids[] = { - { PCI_DEVICE(0x11ab, 0x4100) }, /* Eventual real ID */ - { PCI_DEVICE(0x11ab, 0x4102) }, /* Really eventual real ID */ + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, + PCI_DEVICE_ID_MARVELL_88ALP01_CCIC) }, { 0, } }; diff --git a/v4l/compat.h b/v4l/compat.h index 0e2ccd7a9..f3dfceafe 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -250,4 +250,8 @@ static inline int list_is_singular(const struct list_head *head) #define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond)) #endif +#ifndef PCI_DEVICE_ID_MARVELL_88ALP01_CCIC +#define PCI_DEVICE_ID_MARVELL_88ALP01_CCIC 0x4102 +#endif + #endif -- cgit v1.2.3