diff options
author | Bjørn Mork <bjorn@mork.no> | 2011-03-21 10:35:56 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 06:26:16 -0400 |
commit | abd34d8d6b213c792c1a06fd75488595c5fb6d3f (patch) | |
tree | d5aa6d8081e8bb7ad152153f28e29f472fe4e304 /drivers/media/video/ivtv/ivtv-driver.c | |
parent | ec0c8d555a93aa7e2c5c4f11f12686e5b2245696 (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/video/ivtv/ivtv-driver.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index 39946420b301..a4e4dfdbc2f2 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c | |||
@@ -810,7 +810,6 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *pdev, | |||
810 | const struct pci_device_id *pci_id) | 810 | const struct pci_device_id *pci_id) |
811 | { | 811 | { |
812 | u16 cmd; | 812 | u16 cmd; |
813 | u8 card_rev; | ||
814 | unsigned char pci_latency; | 813 | unsigned char pci_latency; |
815 | 814 | ||
816 | IVTV_DEBUG_INFO("Enabling pci device\n"); | 815 | IVTV_DEBUG_INFO("Enabling pci device\n"); |
@@ -857,7 +856,6 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *pdev, | |||
857 | } | 856 | } |
858 | IVTV_DEBUG_INFO("Bus Mastering Enabled.\n"); | 857 | IVTV_DEBUG_INFO("Bus Mastering Enabled.\n"); |
859 | 858 | ||
860 | pci_read_config_byte(pdev, PCI_CLASS_REVISION, &card_rev); | ||
861 | pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &pci_latency); | 859 | pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &pci_latency); |
862 | 860 | ||
863 | if (pci_latency < 64 && ivtv_pci_latency) { | 861 | if (pci_latency < 64 && ivtv_pci_latency) { |
@@ -874,7 +872,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *pdev, | |||
874 | 872 | ||
875 | IVTV_DEBUG_INFO("%d (rev %d) at %02x:%02x.%x, " | 873 | IVTV_DEBUG_INFO("%d (rev %d) at %02x:%02x.%x, " |
876 | "irq: %d, latency: %d, memory: 0x%lx\n", | 874 | "irq: %d, latency: %d, memory: 0x%lx\n", |
877 | pdev->device, card_rev, pdev->bus->number, | 875 | pdev->device, pdev->revision, pdev->bus->number, |
878 | PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), | 876 | PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), |
879 | pdev->irq, pci_latency, (unsigned long)itv->base_addr); | 877 | pdev->irq, pci_latency, (unsigned long)itv->base_addr); |
880 | 878 | ||