diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-08-18 18:54:49 -0700 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2007-08-18 18:54:49 -0700 |
commit | 231c6131d555f40b849f0e7332b9f90a2568145a (patch) | |
tree | 4a503f983f419cf5d500b27e77a381e1840b1345 /linux/drivers/media/video/cx88/cx88-alsa.c | |
parent | 5c48591870f92de1eb2ccf103e4cb169e6c180f2 (diff) | |
download | mediapointer-dvb-s2-231c6131d555f40b849f0e7332b9f90a2568145a.tar.gz mediapointer-dvb-s2-231c6131d555f40b849f0e7332b9f90a2568145a.tar.bz2 |
cx88-alsa: Use pci_dev->revision
From: Trent Piepho <xyzzy@speakeasy.org>
The revision is part of the pci_dev struct, so there is no need to read it in.
Stop storing the revision and latency in the chip struct, since they're never
used after being printed out when the driver loads.
linux/pci.h wasn't included. It was getting picked up something else,
probably cx88.h, but this file uses struct pci_dev so it should include pci.h.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-alsa.c')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-alsa.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index b440c0e72..0728c49fd 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -28,6 +28,7 @@ #include <linux/device.h> #include <linux/interrupt.h> #include <linux/dma-mapping.h> +#include <linux/pci.h> #include <asm/delay.h> #include <sound/driver.h> @@ -61,7 +62,6 @@ struct cx88_audio_dev { /* pci i/o */ struct pci_dev *pci; - unsigned char pci_rev,pci_lat; /* audio controls */ int irq; @@ -684,6 +684,7 @@ static int __devinit snd_cx88_create(struct snd_card *card, snd_cx88_card_t *chip; struct cx88_core *core; int err; + unsigned char pci_lat; *rchip = NULL; @@ -728,13 +729,19 @@ static int __devinit snd_cx88_create(struct snd_card *card, } /* print pci info */ - pci_read_config_byte(pci, PCI_CLASS_REVISION, &chip->pci_rev); - pci_read_config_byte(pci, PCI_LATENCY_TIMER, &chip->pci_lat); + pci_read_config_byte(pci, PCI_LATENCY_TIMER, &pci_lat); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23) dprintk(1,"ALSA %s/%i: found at %s, rev: %d, irq: %d, " "latency: %d, mmio: 0x%llx\n", core->name, devno, - pci_name(pci), chip->pci_rev, pci->irq, - chip->pci_lat,(unsigned long long)pci_resource_start(pci,0)); + pci_name(pci), pci->revision, pci->irq, + pci_lat, (unsigned long long)pci_resource_start(pci,0)); +#else + dprintk(1,"ALSA %s/%i: found at %s, rev: %d, irq: %d, " + "latency: %d, mmio: 0x%llx\n", core->name, devno, + pci_name(pci), v4l_compat_pci_rev(pci), pci->irq, + pci_lat, (unsigned long long)pci_resource_start(pci,0)); +#endif chip->irq = pci->irq; synchronize_irq(chip->irq); |