Re: [alsa-devel] [RFC PATCH] ASoC: Samsung: Register the audio platform device
Hi,
On Wed, Nov 14, 2012 at 5:39 PM, Padmavathi Venna padma.v@samsung.com wrote:
Audio platform device is not a hardware peripherial. So this device can't be added in the dt devices list. So expanded the module_platform_driver and registered this device using "platform_device_register_simple".
Also added the soc-core pm ops structure in the audio platform driver.
Signed-off-by: Padmavathi Venna padma.v@samsung.com
sound/soc/samsung/smdk_wm8994.c | 31 ++++++++++++++++++++++++++++++- 1 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c index 48dd4dd..7f97969 100644 --- a/sound/soc/samsung/smdk_wm8994.c +++ b/sound/soc/samsung/smdk_wm8994.c @@ -173,16 +173,45 @@ static int __devexit smdk_audio_remove(struct platform_device *pdev) return 0; }
+static struct platform_device *smdk_audio_device;
static struct platform_driver smdk_audio_driver = { .driver = { .name = "smdk-audio", .owner = THIS_MODULE,
.pm = &snd_soc_pm_ops, }, .probe = smdk_audio_probe, .remove = __devexit_p(smdk_audio_remove),
};
-module_platform_driver(smdk_audio_driver); +static int __init smdk_audio_init(void) +{
int ret;
ret = platform_driver_register(&smdk_audio_driver);
if (ret) {
pr_err("unable to register driver\n");
return ret;
}
smdk_audio_device = platform_device_register_simple("smdk-audio", -1, NULL, 0);
if (IS_ERR(smdk_audio_device)) {
platform_driver_unregister(&smdk_audio_driver);
return PTR_ERR(smdk_audio_device);
}
return 0;
+}
+static void __exit smdk_audio_exit(void) +{
platform_device_unregister(smdk_audio_device);
platform_driver_unregister(&smdk_audio_driver);
+}
+module_init(smdk_audio_init); +module_exit(smdk_audio_exit);
Ping. Any comments on this patch?
Thanks Padma
MODULE_DESCRIPTION("ALSA SoC SMDK WM8994"); MODULE_LICENSE("GPL"); -- 1.7.4.4
-- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Nov 26, 2012 at 08:15:12PM +0530, Padma Venkat wrote:
On Wed, Nov 14, 2012 at 5:39 PM, Padmavathi Venna padma.v@samsung.com wrote:
+module_init(smdk_audio_init); +module_exit(smdk_audio_exit);
Ping. Any comments on this patch?
Don't send contentless pings and delete irrelevant context from replies. Please refer to the feedback I sent in response to Sangbeom's pull request - in short, this isn't the way to do this - do what the other platforms do.
participants (2)
-
Mark Brown
-
Padma Venkat