aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-gemtek-pci.c
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2007-06-08 18:46:36 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 19:02:10 -0400
commit44c10138fd4bbc4b6d6bff0873c24902f2a9da65 (patch)
tree6e16d3ec80c87490dc743f72da086356f2906ace /drivers/media/radio/radio-gemtek-pci.c
parentb8a3a5214d7cc115f1ca3a3967b7229d97c46f4a (diff)
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: Auke Kok <auke-jan.h.kok@intel.com> Acked-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/media/radio/radio-gemtek-pci.c')
-rw-r--r--drivers/media/radio/radio-gemtek-pci.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c
index fdf5d6e46eac..5e6f17df204b 100644
--- a/drivers/media/radio/radio-gemtek-pci.c
+++ b/drivers/media/radio/radio-gemtek-pci.c
@@ -94,7 +94,6 @@ struct gemtek_pci_card {
94 94
95 u32 iobase; 95 u32 iobase;
96 u32 length; 96 u32 length;
97 u8 chiprev;
98 u16 model; 97 u16 model;
99 98
100 u32 current_frequency; 99 u32 current_frequency;
@@ -415,7 +414,6 @@ static int __devinit gemtek_pci_probe( struct pci_dev *pci_dev, const struct pci
415 goto err_pci; 414 goto err_pci;
416 } 415 }
417 416
418 pci_read_config_byte( pci_dev, PCI_REVISION_ID, &card->chiprev );
419 pci_read_config_word( pci_dev, PCI_SUBSYSTEM_ID, &card->model ); 417 pci_read_config_word( pci_dev, PCI_SUBSYSTEM_ID, &card->model );
420 418
421 pci_set_drvdata( pci_dev, card ); 419 pci_set_drvdata( pci_dev, card );
@@ -436,7 +434,7 @@ static int __devinit gemtek_pci_probe( struct pci_dev *pci_dev, const struct pci
436 gemtek_pci_mute( card ); 434 gemtek_pci_mute( card );
437 435
438 printk( KERN_INFO "Gemtek PCI Radio (rev. %d) found at 0x%04x-0x%04x.\n", 436 printk( KERN_INFO "Gemtek PCI Radio (rev. %d) found at 0x%04x-0x%04x.\n",
439 card->chiprev, card->iobase, card->iobase + card->length - 1 ); 437 pci_dev->revision, card->iobase, card->iobase + card->length - 1 );
440 438
441 return 0; 439 return 0;
442 440