diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-06-23 14:26:05 -0700 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2007-06-23 14:26:05 -0700 |
commit | 88558110e683392481609b22d94b4a3c8c65571b (patch) | |
tree | 7d599729e0845d6f65f048d692c7b980bd2eb49d | |
parent | b4a1aa072ae1b97f8e7aa536a05704b610947e0f (diff) | |
download | mediapointer-dvb-s2-88558110e683392481609b22d94b4a3c8c65571b.tar.gz mediapointer-dvb-s2-88558110e683392481609b22d94b4a3c8c65571b.tar.bz2 |
compat: Add compat.h code for pci_match_device()
From: Trent Piepho <xyzzy@speakeasy.org>
The first argument changed in 2.6.13, but it can be make backward compatible
with a macro.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
-rw-r--r-- | linux/sound/pci/bt87x.c | 4 | ||||
-rw-r--r-- | v4l/compat.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/linux/sound/pci/bt87x.c b/linux/sound/pci/bt87x.c index 5939a52cb..c0cddc589 100644 --- a/linux/sound/pci/bt87x.c +++ b/linux/sound/pci/bt87x.c @@ -857,11 +857,7 @@ static int __devinit snd_bt87x_detect_card(struct pci_dev *pci) int i; const struct pci_device_id *supported; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) supported = pci_match_device(&driver, pci); -#else - supported = pci_match_device(driver.id_table, pci); -#endif if (supported && supported->driver_data > 0) return supported->driver_data; diff --git a/v4l/compat.h b/v4l/compat.h index 162191689..89ca51748 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -380,6 +380,11 @@ typedef int bool; #define SONY_PIC_COMMAND_SETCAMERA SONYPI_COMMAND_SETCAMERA #endif +/* Parameter to pci_match_device() changed in 2.6.13-rc2 */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && defined(LINUX_PCI_H) +#define pci_match_device(drv, dev) pci_match_device((drv)->id_table, dev) +#endif + #endif /* * Local variables: |