aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/meye.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/video/meye.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/video/meye.c')
-rw-r--r--drivers/media/video/meye.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c
index 664aba8b4d85..7533fc203319 100644
--- a/drivers/media/video/meye.c
+++ b/drivers/media/video/meye.c
@@ -1809,7 +1809,6 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
1809{ 1809{
1810 int ret = -EBUSY; 1810 int ret = -EBUSY;
1811 unsigned long mchip_adr; 1811 unsigned long mchip_adr;
1812 u8 revision;
1813 1812
1814 if (meye.mchip_dev != NULL) { 1813 if (meye.mchip_dev != NULL) {
1815 printk(KERN_ERR "meye: only one device allowed!\n"); 1814 printk(KERN_ERR "meye: only one device allowed!\n");
@@ -1885,7 +1884,6 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
1885 goto outreqirq; 1884 goto outreqirq;
1886 } 1885 }
1887 1886
1888 pci_read_config_byte(meye.mchip_dev, PCI_REVISION_ID, &revision);
1889 pci_write_config_byte(meye.mchip_dev, PCI_CACHE_LINE_SIZE, 8); 1887 pci_write_config_byte(meye.mchip_dev, PCI_CACHE_LINE_SIZE, 8);
1890 pci_write_config_byte(meye.mchip_dev, PCI_LATENCY_TIMER, 64); 1888 pci_write_config_byte(meye.mchip_dev, PCI_LATENCY_TIMER, 64);
1891 1889
@@ -1939,7 +1937,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
1939 printk(KERN_INFO "meye: Motion Eye Camera Driver v%s.\n", 1937 printk(KERN_INFO "meye: Motion Eye Camera Driver v%s.\n",
1940 MEYE_DRIVER_VERSION); 1938 MEYE_DRIVER_VERSION);
1941 printk(KERN_INFO "meye: mchip KL5A72002 rev. %d, base %lx, irq %d\n", 1939 printk(KERN_INFO "meye: mchip KL5A72002 rev. %d, base %lx, irq %d\n",
1942 revision, mchip_adr, meye.mchip_irq); 1940 meye.mchip_dev->revision, mchip_adr, meye.mchip_irq);
1943 1941
1944 return 0; 1942 return 0;
1945 1943