diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2008-09-22 02:57:24 -0400 |
---|---|---|
committer | Clemens Ladisch <clemens@ladisch.de> | 2008-09-22 02:57:24 -0400 |
commit | 2f1b0ec715a1d804b53b45f2555527c27247d1e1 (patch) | |
tree | 1fc2d2e5edbc883ee04a0d678f20e6df284f4593 /sound/pci/oxygen/oxygen.c | |
parent | 568c59e722da22c9b0a485c2f1aaf28cb1b36b79 (diff) |
ALSA: oxygen: remove X-Meridian magic number
Introduce symbols that indicate the two models handled by the snd-oxygen
driver, instead of using a magic number.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/pci/oxygen/oxygen.c')
-rw-r--r-- | sound/pci/oxygen/oxygen.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c index 4722fe08dca8..cf05fd56bc77 100644 --- a/sound/pci/oxygen/oxygen.c +++ b/sound/pci/oxygen/oxygen.c | |||
@@ -58,17 +58,22 @@ MODULE_PARM_DESC(id, "ID string"); | |||
58 | module_param_array(enable, bool, NULL, 0444); | 58 | module_param_array(enable, bool, NULL, 0444); |
59 | MODULE_PARM_DESC(enable, "enable card"); | 59 | MODULE_PARM_DESC(enable, "enable card"); |
60 | 60 | ||
61 | enum { | ||
62 | MODEL_CMEDIA_REF, /* C-Media's reference design */ | ||
63 | MODEL_MERIDIAN, /* AuzenTech X-Meridian */ | ||
64 | }; | ||
65 | |||
61 | static struct pci_device_id oxygen_ids[] __devinitdata = { | 66 | static struct pci_device_id oxygen_ids[] __devinitdata = { |
62 | { OXYGEN_PCI_SUBID(0x10b0, 0x0216) }, | 67 | { OXYGEN_PCI_SUBID(0x10b0, 0x0216), .driver_data = MODEL_CMEDIA_REF }, |
63 | { OXYGEN_PCI_SUBID(0x10b0, 0x0218) }, | 68 | { OXYGEN_PCI_SUBID(0x10b0, 0x0218), .driver_data = MODEL_CMEDIA_REF }, |
64 | { OXYGEN_PCI_SUBID(0x10b0, 0x0219) }, | 69 | { OXYGEN_PCI_SUBID(0x10b0, 0x0219), .driver_data = MODEL_CMEDIA_REF }, |
65 | { OXYGEN_PCI_SUBID(0x13f6, 0x0001) }, | 70 | { OXYGEN_PCI_SUBID(0x13f6, 0x0001), .driver_data = MODEL_CMEDIA_REF }, |
66 | { OXYGEN_PCI_SUBID(0x13f6, 0x0010) }, | 71 | { OXYGEN_PCI_SUBID(0x13f6, 0x0010), .driver_data = MODEL_CMEDIA_REF }, |
67 | { OXYGEN_PCI_SUBID(0x13f6, 0x8788) }, | 72 | { OXYGEN_PCI_SUBID(0x13f6, 0x8788), .driver_data = MODEL_CMEDIA_REF }, |
68 | { OXYGEN_PCI_SUBID(0x147a, 0xa017) }, | 73 | { OXYGEN_PCI_SUBID(0x147a, 0xa017), .driver_data = MODEL_CMEDIA_REF }, |
69 | { OXYGEN_PCI_SUBID(0x1a58, 0x0910) }, | 74 | { OXYGEN_PCI_SUBID(0x1a58, 0x0910), .driver_data = MODEL_CMEDIA_REF }, |
70 | { OXYGEN_PCI_SUBID(0x415a, 0x5431), .driver_data = 1 }, | 75 | { OXYGEN_PCI_SUBID(0x415a, 0x5431), .driver_data = MODEL_MERIDIAN }, |
71 | { OXYGEN_PCI_SUBID(0x7284, 0x9761) }, | 76 | { OXYGEN_PCI_SUBID(0x7284, 0x9761), .driver_data = MODEL_CMEDIA_REF }, |
72 | { } | 77 | { } |
73 | }; | 78 | }; |
74 | MODULE_DEVICE_TABLE(pci, oxygen_ids); | 79 | MODULE_DEVICE_TABLE(pci, oxygen_ids); |
@@ -352,7 +357,7 @@ static int __devinit generic_oxygen_probe(struct pci_dev *pci, | |||
352 | ++dev; | 357 | ++dev; |
353 | return -ENOENT; | 358 | return -ENOENT; |
354 | } | 359 | } |
355 | is_meridian = pci_id->driver_data; | 360 | is_meridian = pci_id->driver_data == MODEL_MERIDIAN; |
356 | err = oxygen_pci_probe(pci, index[dev], id[dev], | 361 | err = oxygen_pci_probe(pci, index[dev], id[dev], |
357 | is_meridian ? &model_meridian : &model_generic, | 362 | is_meridian ? &model_meridian : &model_generic, |
358 | 0); | 363 | 0); |