Convert platform drivers to use struct platform_driver
Signed-off-by: Russell King <[email protected]>
unchanged:
--- b/sound/core/init.c
+++ b/sound/core/init.c
@@ -683,13 +683,14 @@
#endif
/* initialized in sound.c */
-struct device_driver snd_generic_driver = {
- .name = SND_GENERIC_NAME,
- .bus = &platform_bus_type,
+struct platform_driver snd_generic_driver = {
#ifdef CONFIG_PM
.suspend = snd_generic_suspend,
.resume = snd_generic_resume,
#endif
+ .driver = {
+ .name = SND_GENERIC_NAME,
+ },
};
void snd_generic_device_release(struct device *dev)
unchanged:
--- b/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -329,7 +329,7 @@ int __exit snd_minor_info_done(void)
*/
#ifdef CONFIG_SND_GENERIC_DRIVER
-extern struct device_driver snd_generic_driver;
+extern struct platform_driver snd_generic_driver;
#endif
static int __init alsa_sound_init(void)
@@ -359,7 +359,7 @@ static int __init alsa_sound_init(void)
}
snd_info_minor_register();
#ifdef CONFIG_SND_GENERIC_DRIVER
- driver_register(&snd_generic_driver);
+ platform_driver_register(&snd_generic_driver);
#endif
for (controlnum = 0; controlnum < cards_limit; controlnum++)
devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum);
@@ -377,7 +377,7 @@ static void __exit alsa_sound_exit(void)
devfs_remove("snd/controlC%d", controlnum);
#ifdef CONFIG_SND_GENERIC_DRIVER
- driver_unregister(&snd_generic_driver);
+ platform_driver_unregister(&snd_generic_driver);
#endif
snd_info_minor_unregister();
snd_info_done();
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]