]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/ice1712/ice1712.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
[linux-2.6-omap-h63xx.git] / sound / pci / ice1712 / ice1712.c
index b97f50d10ba308cd532bac7285c45b9107fbcbbc..5aca37798c3233a68fd266eca705b0a53b21d9fb 100644 (file)
@@ -100,12 +100,6 @@ MODULE_PARM_DESC(cs8427_timeout, "Define reset timeout for cs8427 chip in msec r
 module_param_array(model, charp, NULL, 0444);
 MODULE_PARM_DESC(model, "Use the given board model.");
 
-#ifndef PCI_VENDOR_ID_ICE
-#define PCI_VENDOR_ID_ICE              0x1412
-#endif
-#ifndef PCI_DEVICE_ID_ICE_1712
-#define PCI_DEVICE_ID_ICE_1712         0x1712
-#endif
 
 static struct pci_device_id snd_ice1712_ids[] = {
        { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_ICE_1712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },   /* ICE1712 */
@@ -393,7 +387,7 @@ int __devinit snd_ice1712_init_cs8427(ice1712_t *ice, int addr)
        if ((err = snd_cs8427_create(ice->i2c, addr,
                                     (ice->cs8427_timeout * HZ) / 1000,
                                     &ice->cs8427)) < 0) {
-               snd_printk("CS8427 initialization failed\n");
+               snd_printk(KERN_ERR "CS8427 initialization failed\n");
                return err;
        }
        ice->spdif.ops.open = open_cs8427;
@@ -2354,12 +2348,12 @@ static int __devinit snd_ice1712_read_eeprom(ice1712_t *ice, const char *modelna
        if (ice->eeprom.size < 6)
                ice->eeprom.size = 32; /* FIXME: any cards without the correct size? */
        else if (ice->eeprom.size > 32) {
-               snd_printk("invalid EEPROM (size = %i)\n", ice->eeprom.size);
+               snd_printk(KERN_ERR "invalid EEPROM (size = %i)\n", ice->eeprom.size);
                return -EIO;
        }
        ice->eeprom.version = snd_ice1712_read_i2c(ice, dev, 0x05);
        if (ice->eeprom.version != 1) {
-               snd_printk("invalid EEPROM version %i\n", ice->eeprom.version);
+               snd_printk(KERN_ERR "invalid EEPROM version %i\n", ice->eeprom.version);
                /* return -EIO; */
        }
        size = ice->eeprom.size - 6;
@@ -2530,12 +2524,12 @@ static int __devinit snd_ice1712_create(snd_card_t * card,
        /* check, if we can restrict PCI DMA transfers to 28 bits */
        if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
            pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
-               snd_printk("architecture does not support 28bit PCI busmaster DMA\n");
+               snd_printk(KERN_ERR "architecture does not support 28bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                return -ENXIO;
        }
 
-       ice = kcalloc(1, sizeof(*ice), GFP_KERNEL);
+       ice = kzalloc(sizeof(*ice), GFP_KERNEL);
        if (ice == NULL) {
                pci_disable_device(pci);
                return -ENOMEM;
@@ -2579,7 +2573,7 @@ static int __devinit snd_ice1712_create(snd_card_t * card,
        ice->profi_port = pci_resource_start(pci, 3);
 
        if (request_irq(pci->irq, snd_ice1712_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1712", (void *) ice)) {
-               snd_printk("unable to grab IRQ %d\n", pci->irq);
+               snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_ice1712_free(ice);
                return -EIO;
        }
@@ -2741,6 +2735,7 @@ static void __devexit snd_ice1712_remove(struct pci_dev *pci)
 
 static struct pci_driver driver = {
        .name = "ICE1712",
+       .owner = THIS_MODULE,
        .id_table = snd_ice1712_ids,
        .probe = snd_ice1712_probe,
        .remove = __devexit_p(snd_ice1712_remove),