aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-05-14 09:17:16 -0400
committerTakashi Iwai <tiwai@suse.de>2009-05-14 09:17:16 -0400
commit35b053becb64eba13f3ea5c8c51023997169ff34 (patch)
tree38843d98f196832ee28791f27408dfdd4d4e0a92
parent9fc20f030ba457d20eb994e1def7e2ce7d5ae1a8 (diff)
ALSA: ctxfi - Avoid unneeded pci_read_config_*() calls
Use struct pci subsystem_device and revision fields instead of unneeded calls of pci_read_config_*(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/ctxfi/ctatc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
index 073fe2a59dae..f52345002334 100644
--- a/sound/pci/ctxfi/ctatc.c
+++ b/sound/pci/ctxfi/ctatc.c
@@ -1190,14 +1190,14 @@ static int atc_dev_free(struct snd_device *dev)
1190 1190
1191static int atc_identify_card(struct ct_atc *atc) 1191static int atc_identify_card(struct ct_atc *atc)
1192{ 1192{
1193 u16 subsys = 0; 1193 u16 subsys;
1194 u8 revision = 0; 1194 u8 revision;
1195 struct pci_dev *pci = atc->pci; 1195 struct pci_dev *pci = atc->pci;
1196 const struct ct_atc_chip_details *d; 1196 const struct ct_atc_chip_details *d;
1197 enum CTCARDS i; 1197 enum CTCARDS i;
1198 1198
1199 pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &subsys); 1199 subsys = pci->subsystem_device;
1200 pci_read_config_byte(pci, PCI_REVISION_ID, &revision); 1200 revision = pci->revision;
1201 atc->chip_details = NULL; 1201 atc->chip_details = NULL;
1202 atc->model = NUM_CTCARDS; 1202 atc->model = NUM_CTCARDS;
1203 for (d = atc_chip_details; d->vendor; d++) { 1203 for (d = atc_chip_details; d->vendor; d++) {
@@ -1308,7 +1308,7 @@ static int atc_get_resources(struct ct_atc *atc)
1308 struct sum_desc sum_dsc = {0}; 1308 struct sum_desc sum_dsc = {0};
1309 struct sum_mgr *sum_mgr = NULL; 1309 struct sum_mgr *sum_mgr = NULL;
1310 int err = 0, i = 0; 1310 int err = 0, i = 0;
1311 unsigned short subsys_id = 0; 1311 unsigned short subsys_id;
1312 1312
1313 atc->daios = kzalloc(sizeof(void *)*(DAIONUM), GFP_KERNEL); 1313 atc->daios = kzalloc(sizeof(void *)*(DAIONUM), GFP_KERNEL);
1314 if (NULL == atc->daios) 1314 if (NULL == atc->daios)
@@ -1339,7 +1339,7 @@ static int atc_get_resources(struct ct_atc *atc)
1339 } 1339 }
1340 atc->n_daio++; 1340 atc->n_daio++;
1341 } 1341 }
1342 pci_read_config_word(atc->pci, PCI_SUBSYSTEM_ID, &subsys_id); 1342 subsys_id = atc->pci->subsystem_device;
1343 if ((subsys_id == 0x0029) || (subsys_id == 0x0031)) { 1343 if ((subsys_id == 0x0029) || (subsys_id == 0x0031)) {
1344 /* SB073x cards */ 1344 /* SB073x cards */
1345 da_desc.type = SPDIFI1; 1345 da_desc.type = SPDIFI1;