ASoC: gtm601: Fix modalias
PATCH 1/2 ASoC: gtm601: Fix modalias
The MODULE_ALIAS needs to match the driver name to make module auto-loading work. Also move MODULE_ALIAS close to other MODULE_* macro.
--- sound/soc/codecs/gtm601.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/codecs/gtm601.c +1 -2
@@ -70,8 +70,6 @@ static int gtm601_platform_remove(struct platform_device *pdev)return 0 ; } -MODULE_ALIAS ("platform:gtm601_codec_audio" ); -#if defined(CONFIG_OF )static const struct of_device_id gtm601_codec_of_match[] = { { .compatible = "option,gtm601", },
@@ -96,3 +94,4 @@ module_platform_driver(gtm601_codec_driver);MODULE_DESCRIPTION ("ASoC gtm601 driver" );MODULE_AUTHOR ("Marek Belisko <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:gtm601" );
Signature · 1 line
2.1.0
PATCH 2/2 ASoC: gtm601: Remove .owner field from platform driver
Remove .owner field because the core will set it.
Also clean up the code a bit to fix indent and make soc_codec_dev_gtm601 const.
--- sound/soc/codecs/gtm601.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
sound/soc/codecs/gtm601.c +3 -5
@@ -51,7 +51,7 @@ struct snd_soc_dai_driver gtm601_dai = { }, }; -static struct snd_soc_codec_driver soc_codec_dev_gtm601 = { +static const struct snd_soc_codec_driver soc_codec_dev_gtm601 = { .dapm_widgets = gtm601_dapm_widgets, .num_dapm_widgets =ARRAY_SIZE (gtm601_dapm_widgets), .dapm_routes = gtm601_dapm_routes,
@@ -80,11 +80,9 @@ MODULE_DEVICE_TABLE(of, gtm601_codec_of_match);static struct platform_driver gtm601_codec_driver = { .driver = { - .name ="gtm601" , - .owner =THIS_MODULE , - .of_match_table =of_match_ptr (gtm601_codec_of_match), + .name ="gtm601" , + .of_match_table =of_match_ptr (gtm601_codec_of_match), }, - .probe = gtm601_platform_probe, .remove = gtm601_platform_remove, };
Signature · 1 line
2.1.0
Mark Brown
maintainerRe: [PATCH 2/2] ASoC: gtm601: Remove .owner field from platform driver
Quoted 3 lines · Axel Lin
Remove .owner field because the core will set it.
Also clean up the code a bit to fix indent and makesoc_codec_dev_gtm601const.
This doesn't apply against current code, please check and resend.
Re: [PATCH 2/2] ASoC: gtm601: Remove .owner field from platform driver
2015-06-24 18:23 GMT+08:00 Mark Brown <[email protected]>:
Quoted 6 lines · Axel Lin
Quoted 3 lines
Remove .owner field because the core will set it.
Also clean up the code a bit to fix indent and makesoc_codec_dev_gtm601const.This doesn't apply against current code, please check and resend.
It's fixed by kbuild test robot <[email protected]> in topic/gtm601.
Mark Brown
maintainerRe: [PATCH 2/2] ASoC: gtm601: Remove .owner field from platform driver
Quoted 5 lines · Axel Lin
2015-06-24 18:23 GMT+08:00 Mark Brown <[email protected]>:
Quoted 1 line
This doesn't apply against current code, please check and resend.
It's fixed by kbuild test robot <[email protected]> in topic/gtm601.
The main bit is but it looked like you had some other changes which are probably still worthwhile?
Re: [PATCH 2/2] ASoC: gtm601: Remove .owner field from platform driver
2015-06-24 19:50 GMT+08:00 Mark Brown <[email protected]>:
Quoted 9 lines · Axel Lin
Quoted 5 lines
2015-06-24 18:23 GMT+08:00 Mark Brown <[email protected]>:
Quoted 1 line
This doesn't apply against current code, please check and resend.
It's fixed by kbuild test robot <[email protected]> in topic/gtm601.
The main bit is but it looked like you had some other changes which are probably still worthwhile?
The sound/soc/codecs/gtm601.c does not exist in today's linux-next tree. I'll check the code again once it appears on linux-next.
Quoted 2 lines · Axel Lin
The
MODULE_ALIASneeds to match the driver name to make module auto-loading work. Also moveMODULE_ALIASclose to other MODULE_* macro.
Applied, thanks.