portman2x4.c (c1f3ee120bb61045b1c0a3ead620d1d65af47130) | portman2x4.c (bd7dd77c2a05c530684eea2e3af16449ae9c5d52) |
---|---|
1/* 2 * Driver for Midiman Portman2x4 parallel port midi interface 3 * 4 * Copyright (c) by Levent Guendogdu <levon@feature-it.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 732 unchanged lines hidden (view full) --- 741 if (dev >= SNDRV_CARDS) 742 return -ENODEV; 743 if (!enable[dev]) 744 return -ENOENT; 745 746 if ((err = snd_portman_probe_port(p)) < 0) 747 return err; 748 | 1/* 2 * Driver for Midiman Portman2x4 parallel port midi interface 3 * 4 * Copyright (c) by Levent Guendogdu <levon@feature-it.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 732 unchanged lines hidden (view full) --- 741 if (dev >= SNDRV_CARDS) 742 return -ENODEV; 743 if (!enable[dev]) 744 return -ENOENT; 745 746 if ((err = snd_portman_probe_port(p)) < 0) 747 return err; 748 |
749 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 750 if (card == NULL) { | 749 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); 750 if (err < 0) { |
751 snd_printd("Cannot create card\n"); | 751 snd_printd("Cannot create card\n"); |
752 return -ENOMEM; | 752 return err; |
753 } 754 strcpy(card->driver, DRIVER_NAME); 755 strcpy(card->shortname, CARD_NAME); 756 sprintf(card->longname, "%s at 0x%lx, irq %i", 757 card->shortname, p->base, p->irq); 758 759 pardev = parport_register_device(p, /* port */ 760 DRIVER_NAME, /* name */ --- 117 unchanged lines hidden --- | 753 } 754 strcpy(card->driver, DRIVER_NAME); 755 strcpy(card->shortname, CARD_NAME); 756 sprintf(card->longname, "%s at 0x%lx, irq %i", 757 card->shortname, p->base, p->irq); 758 759 pardev = parport_register_device(p, /* port */ 760 DRIVER_NAME, /* name */ --- 117 unchanged lines hidden --- |