aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/dmasound
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2009-04-05 06:59:54 -0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2010-05-17 15:37:44 -0400
commitff2db7c5ab78817eb3c5d15dd87f18e9be726f1a (patch)
treebc2b06c1f12c57389d85a2c515be8101261c27d7 /sound/oss/dmasound
parentfa6688e1c7e7341fb7d1ca5878a3641762e60dec (diff)
m68k: amiga - Sound platform device conversion
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'sound/oss/dmasound')
-rw-r--r--sound/oss/dmasound/dmasound_paula.c51
1 files changed, 31 insertions, 20 deletions
diff --git a/sound/oss/dmasound/dmasound_paula.c b/sound/oss/dmasound/dmasound_paula.c
index bb14e4c67e89..87910e992133 100644
--- a/sound/oss/dmasound/dmasound_paula.c
+++ b/sound/oss/dmasound/dmasound_paula.c
@@ -21,6 +21,7 @@
21#include <linux/ioport.h> 21#include <linux/ioport.h>
22#include <linux/soundcard.h> 22#include <linux/soundcard.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/platform_device.h>
24 25
25#include <asm/uaccess.h> 26#include <asm/uaccess.h>
26#include <asm/setup.h> 27#include <asm/setup.h>
@@ -710,31 +711,41 @@ static MACHINE machAmiga = {
710/*** Config & Setup **********************************************************/ 711/*** Config & Setup **********************************************************/
711 712
712 713
713static int __init dmasound_paula_init(void) 714static int __init amiga_audio_probe(struct platform_device *pdev)
714{ 715{
715 int err; 716 dmasound.mach = machAmiga;
716 717 dmasound.mach.default_hard = def_hard ;
717 if (MACH_IS_AMIGA && AMIGAHW_PRESENT(AMI_AUDIO)) { 718 dmasound.mach.default_soft = def_soft ;
718 if (!request_mem_region(CUSTOM_PHYSADDR+0xa0, 0x40, 719 return dmasound_init();
719 "dmasound [Paula]"))
720 return -EBUSY;
721 dmasound.mach = machAmiga;
722 dmasound.mach.default_hard = def_hard ;
723 dmasound.mach.default_soft = def_soft ;
724 err = dmasound_init();
725 if (err)
726 release_mem_region(CUSTOM_PHYSADDR+0xa0, 0x40);
727 return err;
728 } else
729 return -ENODEV;
730} 720}
731 721
732static void __exit dmasound_paula_cleanup(void) 722static int __exit amiga_audio_remove(struct platform_device *pdev)
733{ 723{
734 dmasound_deinit(); 724 dmasound_deinit();
735 release_mem_region(CUSTOM_PHYSADDR+0xa0, 0x40); 725 return 0;
726}
727
728static struct platform_driver amiga_audio_driver = {
729 .remove = __exit_p(amiga_audio_remove),
730 .driver = {
731 .name = "amiga-audio",
732 .owner = THIS_MODULE,
733 },
734};
735
736static int __init amiga_audio_init(void)
737{
738 return platform_driver_probe(&amiga_audio_driver, amiga_audio_probe);
736} 739}
737 740
738module_init(dmasound_paula_init); 741module_init(amiga_audio_init);
739module_exit(dmasound_paula_cleanup); 742
743static void __exit amiga_audio_exit(void)
744{
745 platform_driver_unregister(&amiga_audio_driver);
746}
747
748module_exit(amiga_audio_exit);
749
740MODULE_LICENSE("GPL"); 750MODULE_LICENSE("GPL");
751MODULE_ALIAS("platform:amiga-audio");