From: Clemens Ladisch Date: Mon, 22 Sep 2008 06:57:24 +0000 (+0200) Subject: ALSA: oxygen: remove X-Meridian magic number X-Git-Tag: v2.6.28-rc1~720^2~73 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2f1b0ec715a1d804b53b45f2555527c27247d1e1;p=linux-2.6-omap-h63xx.git 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 --- diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c index 4722fe08dca..cf05fd56bc7 100644 --- a/sound/pci/oxygen/oxygen.c +++ b/sound/pci/oxygen/oxygen.c @@ -58,17 +58,22 @@ MODULE_PARM_DESC(id, "ID string"); module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "enable card"); +enum { + MODEL_CMEDIA_REF, /* C-Media's reference design */ + MODEL_MERIDIAN, /* AuzenTech X-Meridian */ +}; + static struct pci_device_id oxygen_ids[] __devinitdata = { - { OXYGEN_PCI_SUBID(0x10b0, 0x0216) }, - { OXYGEN_PCI_SUBID(0x10b0, 0x0218) }, - { OXYGEN_PCI_SUBID(0x10b0, 0x0219) }, - { OXYGEN_PCI_SUBID(0x13f6, 0x0001) }, - { OXYGEN_PCI_SUBID(0x13f6, 0x0010) }, - { OXYGEN_PCI_SUBID(0x13f6, 0x8788) }, - { OXYGEN_PCI_SUBID(0x147a, 0xa017) }, - { OXYGEN_PCI_SUBID(0x1a58, 0x0910) }, - { OXYGEN_PCI_SUBID(0x415a, 0x5431), .driver_data = 1 }, - { OXYGEN_PCI_SUBID(0x7284, 0x9761) }, + { OXYGEN_PCI_SUBID(0x10b0, 0x0216), .driver_data = MODEL_CMEDIA_REF }, + { OXYGEN_PCI_SUBID(0x10b0, 0x0218), .driver_data = MODEL_CMEDIA_REF }, + { OXYGEN_PCI_SUBID(0x10b0, 0x0219), .driver_data = MODEL_CMEDIA_REF }, + { OXYGEN_PCI_SUBID(0x13f6, 0x0001), .driver_data = MODEL_CMEDIA_REF }, + { OXYGEN_PCI_SUBID(0x13f6, 0x0010), .driver_data = MODEL_CMEDIA_REF }, + { OXYGEN_PCI_SUBID(0x13f6, 0x8788), .driver_data = MODEL_CMEDIA_REF }, + { OXYGEN_PCI_SUBID(0x147a, 0xa017), .driver_data = MODEL_CMEDIA_REF }, + { OXYGEN_PCI_SUBID(0x1a58, 0x0910), .driver_data = MODEL_CMEDIA_REF }, + { OXYGEN_PCI_SUBID(0x415a, 0x5431), .driver_data = MODEL_MERIDIAN }, + { OXYGEN_PCI_SUBID(0x7284, 0x9761), .driver_data = MODEL_CMEDIA_REF }, { } }; MODULE_DEVICE_TABLE(pci, oxygen_ids); @@ -352,7 +357,7 @@ static int __devinit generic_oxygen_probe(struct pci_dev *pci, ++dev; return -ENOENT; } - is_meridian = pci_id->driver_data; + is_meridian = pci_id->driver_data == MODEL_MERIDIAN; err = oxygen_pci_probe(pci, index[dev], id[dev], is_meridian ? &model_meridian : &model_generic, 0);