diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 13:30:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 13:30:33 -0500 |
commit | 407cf84f956ee4b52da5508d5357b8ae212ff77c (patch) | |
tree | b3efbcb770e1202b65aee2fe70ea5a407a60e6a5 /sound/oss/dmasound | |
parent | b3ce1debe2685383a9ad6ace9c49869c3968c013 (diff) | |
parent | 0aeafa77558fc1b44b0f39a4d9e5bd9316420788 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
Diffstat (limited to 'sound/oss/dmasound')
-rw-r--r-- | sound/oss/dmasound/dmasound_awacs.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c index b2bf8bac842d..cebd881b91ae 100644 --- a/sound/oss/dmasound/dmasound_awacs.c +++ b/sound/oss/dmasound/dmasound_awacs.c | |||
@@ -2805,16 +2805,7 @@ __init setup_beep(void) | |||
2805 | return 0 ; | 2805 | return 0 ; |
2806 | } | 2806 | } |
2807 | 2807 | ||
2808 | static struct input_dev awacs_beep_dev = { | 2808 | static struct input_dev *awacs_beep_dev; |
2809 | .evbit = { BIT(EV_SND) }, | ||
2810 | .sndbit = { BIT(SND_BELL) | BIT(SND_TONE) }, | ||
2811 | .event = awacs_beep_event, | ||
2812 | .name = "dmasound beeper", | ||
2813 | .phys = "macio/input0", /* what the heck is this?? */ | ||
2814 | .id = { | ||
2815 | .bustype = BUS_HOST, | ||
2816 | }, | ||
2817 | }; | ||
2818 | 2809 | ||
2819 | int __init dmasound_awacs_init(void) | 2810 | int __init dmasound_awacs_init(void) |
2820 | { | 2811 | { |
@@ -2907,6 +2898,22 @@ printk("dmasound_pmac: couldn't find a Codec we can handle\n"); | |||
2907 | return -ENODEV; | 2898 | return -ENODEV; |
2908 | } | 2899 | } |
2909 | 2900 | ||
2901 | awacs_beep_dev = input_allocate_device(); | ||
2902 | if (!awacs_beep_dev) { | ||
2903 | release_OF_resource(io, 0); | ||
2904 | release_OF_resource(io, 1); | ||
2905 | release_OF_resource(io, 2); | ||
2906 | printk(KERN_ERR "dmasound: can't allocate input device !\n"); | ||
2907 | return -ENOMEM; | ||
2908 | } | ||
2909 | |||
2910 | awacs_beep_dev->name = "dmasound beeper"; | ||
2911 | awacs_beep_dev->phys = "macio/input0"; | ||
2912 | awacs_beep_dev->id.bustype = BUS_HOST; | ||
2913 | awacs_beep_dev->event = awacs_beep_event; | ||
2914 | awacs_beep_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE); | ||
2915 | awacs_beep_dev->evbit[0] = BIT(EV_SND); | ||
2916 | |||
2910 | /* all OF versions I've seen use this value */ | 2917 | /* all OF versions I've seen use this value */ |
2911 | if (i2s_node) | 2918 | if (i2s_node) |
2912 | i2s = ioremap(io->addrs[0].address, 0x1000); | 2919 | i2s = ioremap(io->addrs[0].address, 0x1000); |
@@ -3140,14 +3147,14 @@ printk("dmasound_pmac: Awacs/Screamer Codec Mfct: %d Rev %d\n", mfg, rev); | |||
3140 | * XXX: we should handle errors here, but that would mean | 3147 | * XXX: we should handle errors here, but that would mean |
3141 | * rewriting the whole init code. later.. | 3148 | * rewriting the whole init code. later.. |
3142 | */ | 3149 | */ |
3143 | input_register_device(&awacs_beep_dev); | 3150 | input_register_device(awacs_beep_dev); |
3144 | 3151 | ||
3145 | return dmasound_init(); | 3152 | return dmasound_init(); |
3146 | } | 3153 | } |
3147 | 3154 | ||
3148 | static void __exit dmasound_awacs_cleanup(void) | 3155 | static void __exit dmasound_awacs_cleanup(void) |
3149 | { | 3156 | { |
3150 | input_unregister_device(&awacs_beep_dev); | 3157 | input_unregister_device(awacs_beep_dev); |
3151 | 3158 | ||
3152 | switch (awacs_revision) { | 3159 | switch (awacs_revision) { |
3153 | case AWACS_TUMBLER: | 3160 | case AWACS_TUMBLER: |