pci: use pci_ioremap_bar() in sound/
Use the newly introduced pci_ioremap_bar() function in sound/. pci_ioremap_bar() just takes a pci device and a bar number, with the goal of making it really hard to get wrong, while also having a central place to stick sanity checks. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:

committed by
Takashi Iwai

父節點
2515ddc6db
當前提交
2f5ad54ea6
@@ -1382,8 +1382,8 @@ static int __devinit snd_cs4281_create(struct snd_card *card,
|
||||
chip->ba0_addr = pci_resource_start(pci, 0);
|
||||
chip->ba1_addr = pci_resource_start(pci, 1);
|
||||
|
||||
chip->ba0 = ioremap_nocache(chip->ba0_addr, pci_resource_len(pci, 0));
|
||||
chip->ba1 = ioremap_nocache(chip->ba1_addr, pci_resource_len(pci, 1));
|
||||
chip->ba0 = pci_ioremap_bar(pci, 0);
|
||||
chip->ba1 = pci_ioremap_bar(pci, 1);
|
||||
if (!chip->ba0 || !chip->ba1) {
|
||||
snd_cs4281_free(chip);
|
||||
return -ENOMEM;
|
||||
|
Reference in New Issue
Block a user