aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/via82xx.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-12 16:40:57 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-12 16:40:57 -0400
commit21ba0f88ae56da82a3a15fe54d729208b64c4f4b (patch)
tree17ce67f276fe3ea7284c3dc730bdd6a2ec7dfe2f /sound/pci/via82xx.c
parentdc690d8ef842b464f1c429a376ca16cb8dbee6ae (diff)
parent36e235901f90fb83215be43cbd8f1ca14661ea40 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (34 commits) PCI: Only build PCI syscalls on architectures that want them PCI: limit pci_get_bus_and_slot to domain 0 PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug failure PCI: hotplug: acpiphp: remove hot plug parameter write to PCI host bridge PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3 PCI: hotplug: pciehp: wait for 1 second after power off slot PCI: pci_set_power_state(): check for PM capabilities earlier PCI: cpci_hotplug: Convert to use the kthread API PCI: add pci_try_set_mwi PCI: pcie: remove SPIN_LOCK_UNLOCKED PCI: ROUND_UP macro cleanup in drivers/pci PCI: remove pci_dac_dma_... APIs PCI: pci-x-pci-express-read-control-interfaces cleanups PCI: Fix typo in include/linux/pci.h PCI: pci_ids, remove double or more empty lines PCI: pci_ids, add atheros and 3com_2 vendors PCI: pci_ids, reorder some entries PCI: i386: traps, change VENDOR to DEVICE PCI: ATM: lanai, change VENDOR to DEVICE PCI: Change all drivers to use pci_device->revision ...
Diffstat (limited to 'sound/pci/via82xx.c')
-rw-r--r--sound/pci/via82xx.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index a28992269f5e..50c9f92cfd1b 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -2431,7 +2431,6 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
2431{ 2431{
2432 struct snd_card *card; 2432 struct snd_card *card;
2433 struct via82xx *chip; 2433 struct via82xx *chip;
2434 unsigned char revision;
2435 int chip_type = 0, card_type; 2434 int chip_type = 0, card_type;
2436 unsigned int i; 2435 unsigned int i;
2437 int err; 2436 int err;
@@ -2441,18 +2440,17 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
2441 return -ENOMEM; 2440 return -ENOMEM;
2442 2441
2443 card_type = pci_id->driver_data; 2442 card_type = pci_id->driver_data;
2444 pci_read_config_byte(pci, PCI_REVISION_ID, &revision);
2445 switch (card_type) { 2443 switch (card_type) {
2446 case TYPE_CARD_VIA686: 2444 case TYPE_CARD_VIA686:
2447 strcpy(card->driver, "VIA686A"); 2445 strcpy(card->driver, "VIA686A");
2448 sprintf(card->shortname, "VIA 82C686A/B rev%x", revision); 2446 sprintf(card->shortname, "VIA 82C686A/B rev%x", pci->revision);
2449 chip_type = TYPE_VIA686; 2447 chip_type = TYPE_VIA686;
2450 break; 2448 break;
2451 case TYPE_CARD_VIA8233: 2449 case TYPE_CARD_VIA8233:
2452 chip_type = TYPE_VIA8233; 2450 chip_type = TYPE_VIA8233;
2453 sprintf(card->shortname, "VIA 823x rev%x", revision); 2451 sprintf(card->shortname, "VIA 823x rev%x", pci->revision);
2454 for (i = 0; i < ARRAY_SIZE(via823x_cards); i++) { 2452 for (i = 0; i < ARRAY_SIZE(via823x_cards); i++) {
2455 if (revision == via823x_cards[i].revision) { 2453 if (pci->revision == via823x_cards[i].revision) {
2456 chip_type = via823x_cards[i].type; 2454 chip_type = via823x_cards[i].type;
2457 strcpy(card->shortname, via823x_cards[i].name); 2455 strcpy(card->shortname, via823x_cards[i].name);
2458 break; 2456 break;
@@ -2460,7 +2458,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
2460 } 2458 }
2461 if (chip_type != TYPE_VIA8233A) { 2459 if (chip_type != TYPE_VIA8233A) {
2462 if (dxs_support == VIA_DXS_AUTO) 2460 if (dxs_support == VIA_DXS_AUTO)
2463 dxs_support = check_dxs_list(pci, revision); 2461 dxs_support = check_dxs_list(pci, pci->revision);
2464 /* force to use VIA8233 or 8233A model according to 2462 /* force to use VIA8233 or 8233A model according to
2465 * dxs_support module option 2463 * dxs_support module option
2466 */ 2464 */
@@ -2471,7 +2469,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
2471 } 2469 }
2472 if (chip_type == TYPE_VIA8233A) 2470 if (chip_type == TYPE_VIA8233A)
2473 strcpy(card->driver, "VIA8233A"); 2471 strcpy(card->driver, "VIA8233A");
2474 else if (revision >= VIA_REV_8237) 2472 else if (pci->revision >= VIA_REV_8237)
2475 strcpy(card->driver, "VIA8237"); /* no slog assignment */ 2473 strcpy(card->driver, "VIA8237"); /* no slog assignment */
2476 else 2474 else
2477 strcpy(card->driver, "VIA8233"); 2475 strcpy(card->driver, "VIA8233");
@@ -2482,7 +2480,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
2482 goto __error; 2480 goto __error;
2483 } 2481 }
2484 2482
2485 if ((err = snd_via82xx_create(card, pci, chip_type, revision, 2483 if ((err = snd_via82xx_create(card, pci, chip_type, pci->revision,
2486 ac97_clock, &chip)) < 0) 2484 ac97_clock, &chip)) < 0)
2487 goto __error; 2485 goto __error;
2488 card->private_data = chip; 2486 card->private_data = chip;