Update of /cvsroot/alsa/alsa-kernel/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15469/core
Modified Files: init.c sound.c Log Message: - added the generic PM callback registration. - rewritten ISA callbacks to use the new one. Index: init.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/core/init.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- init.c 8 Apr 2004 16:34:59 -0000 1.45 +++ init.c 3 May 2004 17:36:07 -0000 1.46 @@ -739,8 +739,7 @@ return 0; } -#ifdef CONFIG_ISA -static int snd_isa_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data) +static int snd_generic_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data) { snd_card_t *card = dev->data; @@ -758,28 +757,29 @@ } /** - * snd_card_set_isa_pm_callback - set the ISA power-management callbacks + * snd_card_set_dev_pm_callback - set the generic power-management callbacks * @card: soundcard structure + * @type: PM device type (PM_XXX) * @suspend: suspend callback function * @resume: resume callback function * @private_data: private data to pass to the callback functions * * Registers the power-management and sets the lowlevel callbacks for - * the given ISA card. These callbacks are called from the ALSA's - * common PM handler and from the control API. + * the given card with the given PM type. These callbacks are called + * from the ALSA's common PM handler and from the control API. */ -int snd_card_set_isa_pm_callback(snd_card_t *card, +int snd_card_set_dev_pm_callback(snd_card_t *card, int type, int (*suspend)(snd_card_t *, unsigned int), int (*resume)(snd_card_t *, unsigned int), void *private_data) { - card->pm_dev = pm_register(PM_ISA_DEV, 0, snd_isa_pm_callback); + card->pm_dev = pm_register(type, 0, snd_generic_pm_callback); if (! card->pm_dev) return -ENOMEM; card->pm_dev->data = card; - return snd_card_set_pm_callback(card, suspend, resume, private_data); + snd_card_set_pm_callback(card, suspend, resume, private_data); + return 0; } -#endif #ifdef CONFIG_PCI int snd_card_pci_suspend(struct pci_dev *dev, u32 state) Index: sound.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/core/sound.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- sound.c 8 Apr 2004 16:34:59 -0000 1.61 +++ sound.c 3 May 2004 17:36:07 -0000 1.62 @@ -467,13 +467,11 @@ #ifdef CONFIG_PM EXPORT_SYMBOL(snd_power_wait); EXPORT_SYMBOL(snd_card_set_pm_callback); +EXPORT_SYMBOL(snd_card_set_dev_pm_callback); #ifdef CONFIG_PCI EXPORT_SYMBOL(snd_card_pci_suspend); EXPORT_SYMBOL(snd_card_pci_resume); #endif -#ifdef CONFIG_ISA -EXPORT_SYMBOL(snd_card_set_isa_pm_callback); -#endif #endif /* device.c */ EXPORT_SYMBOL(snd_device_new); ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog