Update of /cvsroot/alsa/alsa-kernel/pci In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16582/pci
Modified Files: als4000.c atiixp.c azt3328.c bt87x.c cmipci.c cs4281.c ens1370.c es1938.c es1968.c fm801.c intel8x0.c intel8x0m.c maestro3.c rme32.c rme96.c sonicvibes.c via82xx.c Log Message: - removed superfluous warning messages after pci_module_init(). (2.6 kernel doesn't return the error anyway...) - store card pointer in pci_drvdata instead of chip pointer. this would make easier to add PM support. Index: als4000.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/als4000.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- als4000.c 7 Apr 2004 17:48:16 -0000 1.32 +++ als4000.c 13 Apr 2004 14:58:59 -0000 1.33 @@ -756,15 +756,7 @@ static int __init alsa_card_als4000_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "no ALS4000 based soundcards found or device busy\n"); -#endif - return err; - } - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_als4000_exit(void) Index: atiixp.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/atiixp.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- atiixp.c 8 Apr 2004 16:35:00 -0000 1.4 +++ atiixp.c 13 Apr 2004 14:59:00 -0000 1.5 @@ -1562,16 +1562,7 @@ static int __init alsa_card_atiixp_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "ATI IXP AC97 controller not found or device busy\n"); -#endif - return err; - } - - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_atiixp_exit(void) Index: azt3328.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/azt3328.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- azt3328.c 7 Apr 2004 17:48:16 -0000 1.12 +++ azt3328.c 13 Apr 2004 14:59:00 -0000 1.13 @@ -1268,6 +1268,10 @@ if (chip->irq < 0) goto __end_hw; + /* reset (close) mixer */ + snd_azf3328_mixer_set_mute(chip, IDX_MIXER_PLAY_MASTER, 1); /* first mute master volume */ + snd_azf3328_mixer_write(chip, IDX_MIXER_RESET, 0x0, WORD_VALUE); + /* interrupt setup - mask everything */ /* FIXME */ @@ -1541,7 +1545,7 @@ snd_azf3328_config_joystick(chip, joystick[dev]); #endif - pci_set_drvdata(pci, chip); + pci_set_drvdata(pci, card); dev++; snd_azf3328_dbgcallleave(); @@ -1550,16 +1554,8 @@ static void __devexit snd_azf3328_remove(struct pci_dev *pci) { - azf3328_t *chip = snd_magic_cast(azf3328_t, pci_get_drvdata(pci), return); - snd_azf3328_dbgcallenter(); - - /* reset (close) mixer */ - snd_azf3328_mixer_set_mute(chip, IDX_MIXER_PLAY_MASTER, 1); /* first mute master volume */ - snd_azf3328_mixer_write(chip, IDX_MIXER_RESET, 0x0, WORD_VALUE); - - if (chip) - snd_card_free(chip->card); + snd_card_free(pci_get_drvdata(pci)); pci_set_drvdata(pci, NULL); snd_azf3328_dbgcallleave(); } @@ -1574,18 +1570,10 @@ static int __init alsa_card_azf3328_init(void) { int err; - snd_azf3328_dbgcallenter(); - - if ((err = pci_module_init(&driver)) < 0) - { -#ifdef MODULE - printk(KERN_ERR "azt3328: no AZF3328 based soundcards found or device busy\n"); -#endif - return err; - } + err = pci_module_init(&driver); snd_azf3328_dbgcallleave(); - return 0; + return err; } static void __exit alsa_card_azf3328_exit(void) Index: bt87x.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/bt87x.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- bt87x.c 7 Apr 2004 17:48:16 -0000 1.4 +++ bt87x.c 13 Apr 2004 14:59:00 -0000 1.5 @@ -809,7 +809,7 @@ if (err < 0) goto _error; - pci_set_drvdata(pci, chip); + pci_set_drvdata(pci, card); ++dev; return 0; @@ -820,9 +820,7 @@ static void __devexit snd_bt87x_remove(struct pci_dev *pci) { - bt87x_t *chip = snd_magic_cast(bt87x_t, pci_get_drvdata(pci), return); - if (chip) - snd_card_free(chip->card); + snd_card_free(pci_get_drvdata(pci)); pci_set_drvdata(pci, NULL); } @@ -852,16 +850,7 @@ static int __init alsa_card_bt87x_init(void) { - int err; - - err = pci_module_init(&driver); - if (err < 0) { -#ifdef MODULE - printk(KERN_ERR "Bt87x soundcard not found or device busy\n"); -#endif - return err; - } - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_bt87x_exit(void) Index: cmipci.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/cmipci.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- cmipci.c 7 Apr 2004 17:48:16 -0000 1.62 +++ cmipci.c 13 Apr 2004 14:59:00 -0000 1.63 @@ -3265,15 +3265,7 @@ static int __init alsa_card_cmipci_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "C-Media PCI soundcard not found or device busy\n"); -#endif - return err; - } - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_cmipci_exit(void) Index: cs4281.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/cs4281.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- cs4281.c 8 Apr 2004 16:35:00 -0000 1.52 +++ cs4281.c 13 Apr 2004 14:59:00 -0000 1.53 @@ -2121,15 +2121,7 @@ static int __init alsa_card_cs4281_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "CS4281 soundcard not found or device busy\n"); -#endif - return err; - } - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_cs4281_exit(void) Index: ens1370.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/ens1370.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- ens1370.c 7 Apr 2004 17:48:16 -0000 1.59 +++ ens1370.c 13 Apr 2004 14:59:00 -0000 1.60 @@ -2372,15 +2372,7 @@ static int __init alsa_card_ens137x_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "Ensoniq AudioPCI soundcard not found or device busy\n"); -#endif - return err; - } - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_ens137x_exit(void) Index: es1938.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/es1938.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- es1938.c 7 Apr 2004 17:48:16 -0000 1.34 +++ es1938.c 13 Apr 2004 14:59:00 -0000 1.35 @@ -1701,15 +1701,7 @@ static int __init alsa_card_es1938_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "ESS Solo-1 soundcard not found or device busy\n"); -#endif - return err; - } - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_es1938_exit(void) Index: es1968.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/es1968.c,v retrieving revision 1.63 retrieving revision 1.64 diff -u -r1.63 -r1.64 --- es1968.c 8 Apr 2004 16:35:00 -0000 1.63 +++ es1968.c 13 Apr 2004 14:59:00 -0000 1.64 @@ -2743,22 +2743,11 @@ static int __init alsa_card_es1968_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "ESS Maestro soundcard not found or device busy\n"); -#endif - return err; - } - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_es1968_exit(void) { -#if 0 // do we really need this? - unregister_reboot_notifier(&snd_es1968_nb); -#endif pci_unregister_driver(&driver); } Index: fm801.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/fm801.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- fm801.c 7 Apr 2004 17:48:16 -0000 1.44 +++ fm801.c 13 Apr 2004 14:59:00 -0000 1.45 @@ -1483,15 +1483,7 @@ static int __init alsa_card_fm801_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "ForteMedia FM801 soundcard not found or device busy\n"); -#endif - return err; - } - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_fm801_exit(void) Index: intel8x0.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/intel8x0.c,v retrieving revision 1.132 retrieving revision 1.133 diff -u -r1.132 -r1.133 --- intel8x0.c 8 Apr 2004 16:35:00 -0000 1.132 +++ intel8x0.c 13 Apr 2004 14:59:00 -0000 1.133 @@ -2779,12 +2779,9 @@ { int err; - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "Intel ICH soundcard not found or device busy\n"); -#endif + if ((err = pci_module_init(&driver)) < 0) return err; - } + #if defined(SUPPORT_JOYSTICK) || defined(SUPPORT_MIDI) if (pci_module_init(&joystick_driver) < 0) { snd_printdd(KERN_INFO "no joystick found\n"); Index: intel8x0m.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/intel8x0m.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- intel8x0m.c 8 Apr 2004 16:35:00 -0000 1.3 +++ intel8x0m.c 13 Apr 2004 14:59:00 -0000 1.4 @@ -1409,16 +1409,7 @@ static int __init alsa_card_intel8x0m_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "Intel ICH modemcard not found or device busy\n"); -#endif - return err; - } - - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_intel8x0m_exit(void) Index: maestro3.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/maestro3.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- maestro3.c 8 Apr 2004 16:35:00 -0000 1.50 +++ maestro3.c 13 Apr 2004 14:59:00 -0000 1.51 @@ -2721,15 +2721,7 @@ static int __init alsa_card_m3_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "Maestro3/Allegro soundcard not found or device busy\n"); -#endif - return err; - } - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_m3_exit(void) Index: rme32.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/rme32.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- rme32.c 7 Apr 2004 17:48:17 -0000 1.32 +++ rme32.c 13 Apr 2004 14:59:00 -0000 1.33 @@ -1996,15 +1996,7 @@ static int __init alsa_card_rme32_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - snd_printk("No RME Digi32 cards found\n"); -#endif - return err; - } - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_rme32_exit(void) Index: rme96.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/rme96.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- rme96.c 7 Apr 2004 17:48:17 -0000 1.34 +++ rme96.c 13 Apr 2004 14:59:00 -0000 1.35 @@ -2566,15 +2566,7 @@ static int __init alsa_card_rme96_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "No RME Digi96 cards found\n"); -#endif - return err; - } - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_rme96_exit(void) Index: sonicvibes.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/sonicvibes.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- sonicvibes.c 7 Apr 2004 17:48:17 -0000 1.34 +++ sonicvibes.c 13 Apr 2004 14:59:00 -0000 1.35 @@ -1536,15 +1536,7 @@ static int __init alsa_card_sonicvibes_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "S3 SonicVibes soundcard not found or device busy\n"); -#endif - return err; - } - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_sonicvibes_exit(void) Index: via82xx.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/via82xx.c,v retrieving revision 1.95 retrieving revision 1.96 diff -u -r1.95 -r1.96 --- via82xx.c 7 Apr 2004 17:48:17 -0000 1.95 +++ via82xx.c 13 Apr 2004 14:59:00 -0000 1.96 @@ -2190,15 +2190,7 @@ static int __init alsa_card_via82xx_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "VIA 82xx soundcard not found or device busy\n"); -#endif - return err; - } - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_via82xx_exit(void) ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog