X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=sound%2Fdrivers%2Fmts64.c;h=9284829bf9275e9c2afabbbe8e2026c35c2dfb60;hb=8fe23e057172223fe2048768a4d87ab7de7477bc;hp=68070cccc6becce90a9ffd336eebdcc31b1369da;hpb=3b892467786410f26dffc2c7bccd3ea445604037;p=safe%2Fjmp%2Flinux-2.6 diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c index 68070cc..9284829 100644 --- a/sound/drivers/mts64.c +++ b/sound/drivers/mts64.c @@ -18,7 +18,6 @@ * */ -#include #include #include #include @@ -666,7 +665,7 @@ static int __devinit snd_mts64_ctl_create(struct snd_card *card, struct mts64 *mts) { int err, i; - static struct snd_kcontrol_new *control[] = { + static struct snd_kcontrol_new *control[] __devinitdata = { &mts64_ctl_smpte_switch, &mts64_ctl_smpte_time_hours, &mts64_ctl_smpte_time_minutes, @@ -958,10 +957,10 @@ static int __devinit snd_mts64_probe(struct platform_device *pdev) if ((err = snd_mts64_probe_port(p)) < 0) return err; - card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); - if (card == NULL) { + err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); + if (err < 0) { snd_printd("Cannot create card\n"); - return -ENOMEM; + return err; } strcpy(card->driver, DRIVER_NAME); strcpy(card->shortname, "ESI " CARD_NAME); @@ -1008,13 +1007,15 @@ static int __devinit snd_mts64_probe(struct platform_device *pdev) platform_set_drvdata(pdev, card); + snd_card_set_dev(card, &pdev->dev); + /* At this point card will be usable */ if ((err = snd_card_register(card)) < 0) { snd_printd("Cannot register card\n"); goto __err; } - snd_printk("ESI Miditerminal 4140 on 0x%lx\n", p->base); + snd_printk(KERN_INFO "ESI Miditerminal 4140 on 0x%lx\n", p->base); return 0; __err: