[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>
This commit is contained in:
committed by
Jaroslav Kysela
parent
8cdfd2519c
commit
0dd119f703
@ -3537,7 +3537,7 @@ static void clkrun_hack(cs46xx_t *chip, int change)
|
||||
{
|
||||
u16 control, nval;
|
||||
|
||||
if (chip->acpi_dev == NULL)
|
||||
if (!chip->acpi_port)
|
||||
return;
|
||||
|
||||
chip->amplifier += change;
|
||||
@ -3560,15 +3560,20 @@ static void clkrun_hack(cs46xx_t *chip, int change)
|
||||
*/
|
||||
static void clkrun_init(cs46xx_t *chip)
|
||||
{
|
||||
struct pci_dev *pdev;
|
||||
u8 pp;
|
||||
|
||||
chip->acpi_dev = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, NULL);
|
||||
if (chip->acpi_dev == NULL)
|
||||
chip->acpi_port = 0;
|
||||
|
||||
pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
|
||||
PCI_DEVICE_ID_INTEL_82371AB_3, NULL);
|
||||
if (pdev == NULL)
|
||||
return; /* Not a thinkpad thats for sure */
|
||||
|
||||
/* Find the control port */
|
||||
pci_read_config_byte(chip->acpi_dev, 0x41, &pp);
|
||||
pci_read_config_byte(pdev, 0x41, &pp);
|
||||
chip->acpi_port = pp << 8;
|
||||
pci_dev_put(pdev);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user