Update of /cvsroot/alsa/alsa-kernel/ppc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16585
Modified Files: pmac.c Log Message: another fix for the new suspend/resume. Index: pmac.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/ppc/pmac.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- pmac.c 15 Apr 2004 16:23:18 -0000 1.27 +++ pmac.c 16 Apr 2004 09:25:56 -0000 1.28 @@ -1169,9 +1169,8 @@ #if defined(CONFIG_PM) && defined(CONFIG_PMAC_PBOOK) /* add sleep notifier */ - snd_pmac_register_sleep_notifier(chip); - card->set_power_state = snd_pmac_set_power_state; - card->power_state_private_data = chip; + if (! snd_pmac_register_sleep_notifier(chip)) + snd_card_set_pm_callback(chip->card, snd_pmac_suspend, snd_pmac_resume, chip); #endif if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) @@ -1275,21 +1274,16 @@ static int __init snd_pmac_register_sleep_notifier(pmac_t *chip) { /* should be protected here.. */ - if (sleeping_pmac) { - snd_printd("sleep notifier already reigistered\n"); - return -EBUSY; - } + snd_assert(! sleeping_pmac, return -EBUSY); sleeping_pmac = chip; pmu_register_sleep_notifier(&snd_pmac_sleep_notifier); - snd_card_set_pm_callback(chip->card, snd_pmac_suspend, snd_pmac_resume, chip); return 0; } static int snd_pmac_unregister_sleep_notifier(pmac_t *chip) { /* should be protected here.. */ - if (sleeping_pmac != chip) - return -ENODEV; + snd_assert(sleeping_pmac == chip, return -ENODEV); pmu_unregister_sleep_notifier(&snd_pmac_sleep_notifier); sleeping_pmac = NULL; return 0; ------------------------------------------------------- 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