diff options
Diffstat (limited to 'sound/core/init.c')
-rw-r--r-- | sound/core/init.c | 17 |
1 files changed, 9 insertions, 8 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 | ||