aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2011-03-21 10:35:56 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 06:26:16 -0400
commitabd34d8d6b213c792c1a06fd75488595c5fb6d3f (patch)
treed5aa6d8081e8bb7ad152153f28e29f472fe4e304 /drivers/media/common
parentec0c8d555a93aa7e2c5c4f11f12686e5b2245696 (diff)
[media] use pci_dev->revision
pci_setup_device() has saved the PCI revision in the pci_dev struct since Linux 2.6.23. Use it. Cc: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/saa7146_core.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c
index 9f47e383c57a..9af2140b57a4 100644
--- a/drivers/media/common/saa7146_core.c
+++ b/drivers/media/common/saa7146_core.c
@@ -378,12 +378,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
378 dev->pci = pci; 378 dev->pci = pci;
379 379
380 /* get chip-revision; this is needed to enable bug-fixes */ 380 /* get chip-revision; this is needed to enable bug-fixes */
381 err = pci_read_config_dword(pci, PCI_CLASS_REVISION, &dev->revision); 381 dev->revision = pci->revision;
382 if (err < 0) {
383 ERR(("pci_read_config_dword() failed.\n"));
384 goto err_disable;
385 }
386 dev->revision &= 0xf;
387 382
388 /* remap the memory from virtual to physical address */ 383 /* remap the memory from virtual to physical address */
389 384