mts64.c (6bd0dd5f0ec67f654ebf95be8ef414afae1eecb7) | mts64.c (45203832df2fa9e94ca0a249ddb20d2b077e58cc) |
---|---|
1/* 2 * ALSA Driver for Ego Systems Inc. (ESI) Miditerminal 4140 3 * Copyright (c) 2006 by Matthias König <mk@phasorlab.de> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 943 unchanged lines hidden (view full) --- 952 953 if (dev >= SNDRV_CARDS) 954 return -ENODEV; 955 if (!enable[dev]) 956 return -ENOENT; 957 if ((err = snd_mts64_probe_port(p)) < 0) 958 return err; 959 | 1/* 2 * ALSA Driver for Ego Systems Inc. (ESI) Miditerminal 4140 3 * Copyright (c) 2006 by Matthias König <mk@phasorlab.de> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 943 unchanged lines hidden (view full) --- 952 953 if (dev >= SNDRV_CARDS) 954 return -ENODEV; 955 if (!enable[dev]) 956 return -ENOENT; 957 if ((err = snd_mts64_probe_port(p)) < 0) 958 return err; 959 |
960 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); 961 if (err < 0) { | 960 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 961 if (card == NULL) { |
962 snd_printd("Cannot create card\n"); | 962 snd_printd("Cannot create card\n"); |
963 return err; | 963 return -ENOMEM; |
964 } 965 strcpy(card->driver, DRIVER_NAME); 966 strcpy(card->shortname, "ESI " CARD_NAME); 967 sprintf(card->longname, "%s at 0x%lx, irq %i", 968 card->shortname, p->base, p->irq); 969 970 pardev = parport_register_device(p, /* port */ 971 DRIVER_NAME, /* name */ --- 38 unchanged lines hidden (view full) --- 1010 snd_card_set_dev(card, &pdev->dev); 1011 1012 /* At this point card will be usable */ 1013 if ((err = snd_card_register(card)) < 0) { 1014 snd_printd("Cannot register card\n"); 1015 goto __err; 1016 } 1017 | 964 } 965 strcpy(card->driver, DRIVER_NAME); 966 strcpy(card->shortname, "ESI " CARD_NAME); 967 sprintf(card->longname, "%s at 0x%lx, irq %i", 968 card->shortname, p->base, p->irq); 969 970 pardev = parport_register_device(p, /* port */ 971 DRIVER_NAME, /* name */ --- 38 unchanged lines hidden (view full) --- 1010 snd_card_set_dev(card, &pdev->dev); 1011 1012 /* At this point card will be usable */ 1013 if ((err = snd_card_register(card)) < 0) { 1014 snd_printd("Cannot register card\n"); 1015 goto __err; 1016 } 1017 |
1018 snd_printk("ESI Miditerminal 4140 on 0x%lx\n", p->base); | 1018 snd_printk(KERN_INFO "ESI Miditerminal 4140 on 0x%lx\n", p->base); |
1019 return 0; 1020 1021__err: 1022 snd_card_free(card); 1023 return err; 1024} 1025 1026static int __devexit snd_mts64_remove(struct platform_device *pdev) --- 62 unchanged lines hidden --- | 1019 return 0; 1020 1021__err: 1022 snd_card_free(card); 1023 return err; 1024} 1025 1026static int __devexit snd_mts64_remove(struct platform_device *pdev) --- 62 unchanged lines hidden --- |