diff options
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/init.c | 17 | ||||
-rw-r--r-- | sound/core/sound.c | 8 |
2 files changed, 13 insertions, 12 deletions
diff --git a/sound/core/init.c b/sound/core/init.c index d9ee27ae9a51..33813f92ab52 100644 --- a/sound/core/init.c +++ b/sound/core/init.c | |||
@@ -674,23 +674,24 @@ struct snd_generic_device { | |||
674 | snd_card_t *card; | 674 | snd_card_t *card; |
675 | }; | 675 | }; |
676 | 676 | ||
677 | #define get_snd_generic_card(dev) container_of(to_platform_device(dev), struct snd_generic_device, pdev)->card | 677 | #define get_snd_generic_card(dev) container_of(dev, struct snd_generic_device, pdev)->card |
678 | 678 | ||
679 | #define SND_GENERIC_NAME "snd_generic" | 679 | #define SND_GENERIC_NAME "snd_generic" |
680 | 680 | ||
681 | #ifdef CONFIG_PM | 681 | #ifdef CONFIG_PM |
682 | static int snd_generic_suspend(struct device *dev, pm_message_t state); | 682 | static int snd_generic_suspend(struct platform_device *dev, pm_message_t state); |
683 | static int snd_generic_resume(struct device *dev); | 683 | static int snd_generic_resume(struct platform_device *dev); |
684 | #endif | 684 | #endif |
685 | 685 | ||
686 | /* initialized in sound.c */ | 686 | /* initialized in sound.c */ |
687 | struct device_driver snd_generic_driver = { | 687 | struct platform_driver snd_generic_driver = { |
688 | .name = SND_GENERIC_NAME, | ||
689 | .bus = &platform_bus_type, | ||
690 | #ifdef CONFIG_PM | 688 | #ifdef CONFIG_PM |
691 | .suspend = snd_generic_suspend, | 689 | .suspend = snd_generic_suspend, |
692 | .resume = snd_generic_resume, | 690 | .resume = snd_generic_resume, |
693 | #endif | 691 | #endif |
692 | .driver = { | ||
693 | .name = SND_GENERIC_NAME, | ||
694 | }, | ||
694 | }; | 695 | }; |
695 | 696 | ||
696 | void snd_generic_device_release(struct device *dev) | 697 | void snd_generic_device_release(struct device *dev) |
@@ -821,7 +822,7 @@ int snd_card_set_pm_callback(snd_card_t *card, | |||
821 | 822 | ||
822 | #ifdef CONFIG_SND_GENERIC_DRIVER | 823 | #ifdef CONFIG_SND_GENERIC_DRIVER |
823 | /* suspend/resume callbacks for snd_generic platform device */ | 824 | /* suspend/resume callbacks for snd_generic platform device */ |
824 | static int snd_generic_suspend(struct device *dev, pm_message_t state) | 825 | static int snd_generic_suspend(struct platform_device *dev, pm_message_t state) |
825 | { | 826 | { |
826 | snd_card_t *card; | 827 | snd_card_t *card; |
827 | 828 | ||
@@ -834,7 +835,7 @@ static int snd_generic_suspend(struct device *dev, pm_message_t state) | |||
834 | return 0; | 835 | return 0; |
835 | } | 836 | } |
836 | 837 | ||
837 | static int snd_generic_resume(struct device *dev) | 838 | static int snd_generic_resume(struct platform_device *dev) |
838 | { | 839 | { |
839 | snd_card_t *card; | 840 | snd_card_t *card; |
840 | 841 | ||
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(); |