aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/cs46xx/cs46xx_lib.c
diff options
context:
space:
mode:
authorJiri Slaby <xslaby@fi.muni.cz>2005-09-07 08:28:33 -0400
committerJaroslav Kysela <perex@suse.cz>2005-09-12 04:47:08 -0400
commit0dd119f703d50759f0835f342e385f82cbf8b89e (patch)
treed2b5805f5ae93b44cab1603b9e80fbf163048d8f /sound/pci/cs46xx/cs46xx_lib.c
parent8cdfd2519c6c9a1e6057dc5970b2542b35895738 (diff)
[ALSA] pci_find_device remove
Memalloc module,CS46xx driver,VIA82xx driver,ALI5451 driver au88x0 driver Replace pci_find_device() with pci_get_device() and pci_dev_put(). Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/cs46xx/cs46xx_lib.c')
-rw-r--r--sound/pci/cs46xx/cs46xx_lib.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index fd9c82c07b3e..03329a7efb91 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -3537,7 +3537,7 @@ static void clkrun_hack(cs46xx_t *chip, int change)
3537{ 3537{
3538 u16 control, nval; 3538 u16 control, nval;
3539 3539
3540 if (chip->acpi_dev == NULL) 3540 if (!chip->acpi_port)
3541 return; 3541 return;
3542 3542
3543 chip->amplifier += change; 3543 chip->amplifier += change;
@@ -3560,15 +3560,20 @@ static void clkrun_hack(cs46xx_t *chip, int change)
3560 */ 3560 */
3561static void clkrun_init(cs46xx_t *chip) 3561static void clkrun_init(cs46xx_t *chip)
3562{ 3562{
3563 struct pci_dev *pdev;
3563 u8 pp; 3564 u8 pp;
3564 3565
3565 chip->acpi_dev = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, NULL); 3566 chip->acpi_port = 0;
3566 if (chip->acpi_dev == NULL) 3567
3568 pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
3569 PCI_DEVICE_ID_INTEL_82371AB_3, NULL);
3570 if (pdev == NULL)
3567 return; /* Not a thinkpad thats for sure */ 3571 return; /* Not a thinkpad thats for sure */
3568 3572
3569 /* Find the control port */ 3573 /* Find the control port */
3570 pci_read_config_byte(chip->acpi_dev, 0x41, &pp); 3574 pci_read_config_byte(pdev, 0x41, &pp);
3571 chip->acpi_port = pp << 8; 3575 chip->acpi_port = pp << 8;
3576 pci_dev_put(pdev);
3572} 3577}
3573 3578
3574 3579