summaryrefslogtreecommitdiff
path: root/linux/drivers/media/radio
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-07-19 12:17:32 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-07-19 12:17:32 -0300
commit8eafdf22da24dd4b20c2d1cef50a032e3ff31762 (patch)
tree7e1c7212ca1364dab59706580af700b3bd133ec0 /linux/drivers/media/radio
parentfde8743297a686ad2993a1775348d058b1943c50 (diff)
downloadmediapointer-dvb-s2-8eafdf22da24dd4b20c2d1cef50a032e3ff31762.tar.gz
mediapointer-dvb-s2-8eafdf22da24dd4b20c2d1cef50a032e3ff31762.tar.bz2
Backport kernel changeset 44c10138fd4bbc4b6d6bff0873c24902f2a9da65
From: Mauro Carvalho Chehab <mchehab@infradead.org> backport patch from Auke Kok <auke-jan.h.kok@intel.com>: PCI: Change all drivers to use pci_device->revision Instead of all drivers reading pci config space to get the revision ID, they can now use the pci_device->revision member. This exposes some issues where drivers where reading a word or a dword for the revision number, and adding useless error-handling around the read. Some drivers even just read it for no purpose of all. In devices where the revision ID is being copied over and used in what appears to be the equivalent of hotpath, I have left the copy code and the cached copy as not to influence the driver's performance. Compile tested with make all{yes,mod}config on x86_64 and i386. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/radio')
-rw-r--r--linux/drivers/media/radio/radio-gemtek-pci.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/linux/drivers/media/radio/radio-gemtek-pci.c b/linux/drivers/media/radio/radio-gemtek-pci.c
index 089b5ed1f..4829eea69 100644
--- a/linux/drivers/media/radio/radio-gemtek-pci.c
+++ b/linux/drivers/media/radio/radio-gemtek-pci.c
@@ -95,7 +95,6 @@ struct gemtek_pci_card {
u32 iobase;
u32 length;
- u8 chiprev;
u16 model;
u32 current_frequency;
@@ -415,7 +414,6 @@ static int __devinit gemtek_pci_probe( struct pci_dev *pci_dev, const struct pci
goto err_pci;
}
- pci_read_config_byte( pci_dev, PCI_REVISION_ID, &card->chiprev );
pci_read_config_word( pci_dev, PCI_SUBSYSTEM_ID, &card->model );
pci_set_drvdata( pci_dev, card );
@@ -436,7 +434,7 @@ static int __devinit gemtek_pci_probe( struct pci_dev *pci_dev, const struct pci
gemtek_pci_mute( card );
printk( KERN_INFO "Gemtek PCI Radio (rev. %d) found at 0x%04x-0x%04x.\n",
- card->chiprev, card->iobase, card->iobase + card->length - 1 );
+ pci_dev->revision, card->iobase, card->iobase + card->length - 1 );
return 0;