diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-11-09 17:32:44 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-11-09 17:32:44 -0500 |
commit | 3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (patch) | |
tree | d8825be54cefb6ad6707478d719c8e30605bee7b /sound/core/sound.c | |
parent | 00d3dcdd96646be6059cc21f2efa94c4edc1eda5 (diff) |
[DRIVER MODEL] Convert platform drivers to use struct platform_driver
This allows us to eliminate the casts in the drivers, and eventually
remove the use of the device_driver function pointer methods for
platform device drivers.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound/core/sound.c')
-rw-r--r-- | sound/core/sound.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c index 1139dd8ca8eb..6e7cad1e947e 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <sound/initval.h> | 32 | #include <sound/initval.h> |
33 | #include <linux/kmod.h> | 33 | #include <linux/kmod.h> |
34 | #include <linux/devfs_fs_kernel.h> | 34 | #include <linux/devfs_fs_kernel.h> |
35 | #include <linux/device.h> | 35 | #include <linux/platform_device.h> |
36 | 36 | ||
37 | #define SNDRV_OS_MINORS 256 | 37 | #define SNDRV_OS_MINORS 256 |
38 | 38 | ||
@@ -329,7 +329,7 @@ int __exit snd_minor_info_done(void) | |||
329 | */ | 329 | */ |
330 | 330 | ||
331 | #ifdef CONFIG_SND_GENERIC_DRIVER | 331 | #ifdef CONFIG_SND_GENERIC_DRIVER |
332 | extern struct device_driver snd_generic_driver; | 332 | extern struct platform_driver snd_generic_driver; |
333 | #endif | 333 | #endif |
334 | 334 | ||
335 | static int __init alsa_sound_init(void) | 335 | static int __init alsa_sound_init(void) |
@@ -357,7 +357,7 @@ static int __init alsa_sound_init(void) | |||
357 | } | 357 | } |
358 | snd_info_minor_register(); | 358 | snd_info_minor_register(); |
359 | #ifdef CONFIG_SND_GENERIC_DRIVER | 359 | #ifdef CONFIG_SND_GENERIC_DRIVER |
360 | driver_register(&snd_generic_driver); | 360 | platform_driver_register(&snd_generic_driver); |
361 | #endif | 361 | #endif |
362 | for (controlnum = 0; controlnum < cards_limit; controlnum++) | 362 | for (controlnum = 0; controlnum < cards_limit; controlnum++) |
363 | devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum); | 363 | devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum); |
@@ -375,7 +375,7 @@ static void __exit alsa_sound_exit(void) | |||
375 | devfs_remove("snd/controlC%d", controlnum); | 375 | devfs_remove("snd/controlC%d", controlnum); |
376 | 376 | ||
377 | #ifdef CONFIG_SND_GENERIC_DRIVER | 377 | #ifdef CONFIG_SND_GENERIC_DRIVER |
378 | driver_unregister(&snd_generic_driver); | 378 | platform_driver_unregister(&snd_generic_driver); |
379 | #endif | 379 | #endif |
380 | snd_info_minor_unregister(); | 380 | snd_info_minor_unregister(); |
381 | snd_info_done(); | 381 | snd_info_done(); |