From 8a55acadcb3c75ee7a84683f612607957468a132 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Fri, 20 Jul 2007 00:42:46 -0700 Subject: compat: keep printing pci revision on older kernels From: Trent Piepho In 2.6.23, there is a new struct pci_dev->revision field to get the pci revision. A couple drivers now use this to print the revision and on old kernels don't print it anymore. This patch adds a simple function to get the revision to compat.h to make it easy for the backward compay code to keep printing the revision like is used too. Signed-off-by: Trent Piepho --- linux/drivers/media/radio/radio-gemtek-pci.c | 5 +++-- linux/drivers/media/video/meye.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/radio/radio-gemtek-pci.c b/linux/drivers/media/radio/radio-gemtek-pci.c index b0c7b640d..dd050d4f1 100644 --- a/linux/drivers/media/radio/radio-gemtek-pci.c +++ b/linux/drivers/media/radio/radio-gemtek-pci.c @@ -434,8 +434,9 @@ static int __devinit gemtek_pci_probe( struct pci_dev *pci_dev, const struct pci printk( KERN_INFO "Gemtek PCI Radio (rev. %d) found at 0x%04x-0x%04x.\n", pci_dev->revision, card->iobase, card->iobase + card->length - 1 ); #else - printk( KERN_INFO "Gemtek PCI Radio found at 0x%04x-0x%04x.\n", - card->iobase, card->iobase + card->length - 1 ); + printk( KERN_INFO "Gemtek PCI Radio (rev. %d) found at 0x%04x-0x%04x.\n", + v4l_compat_pci_rev(pci_dev), card->iobase, + card->iobase + card->length - 1 ); #endif return 0; diff --git a/linux/drivers/media/video/meye.c b/linux/drivers/media/video/meye.c index be29d0483..035000a14 100644 --- a/linux/drivers/media/video/meye.c +++ b/linux/drivers/media/video/meye.c @@ -1945,8 +1945,8 @@ static int __devinit meye_probe(struct pci_dev *pcidev, printk(KERN_INFO "meye: mchip KL5A72002 rev. %d, base %lx, irq %d\n", meye.mchip_dev->revision, mchip_adr, meye.mchip_irq); #else - printk(KERN_INFO "meye: mchip KL5A72002, base %lx, irq %d\n", - mchip_adr, meye.mchip_irq); + printk(KERN_INFO "meye: mchip KL5A72002 rev. %d, base %lx, irq %d\n", + v4l_compat_pci_rev(meye.mchip_dev), mchip_adr, meye.mchip_irq); #endif return 0; -- cgit v1.2.3