[alsa-devel] [PATCH v2 0/4] ASoC: constification and random cleanups
Hello,
this is the series sent on Sunday rebased on next. There was a conflict with commit c660c0a80586 (ASoC: fsi: constify of_device_id array) which did a part of my 2nd patch but already conflicted with the first one.
Mark said he already took patch 3, but that should not be a problem. Patch 4 applied just fine to next, so this is just a resend.
Best regards Uwe
Uwe Kleine-König (4): ASoC: fsi: reorder code to make a forward declaration superfluous ASoC: fsi: mark several data structures as const ASoC: fsi: fix license specification ASoC: mark of_device_id and device data as constant
sound/soc/sh/fsi.c | 71 ++++++++++++++++++++++++------------------------ sound/soc/sh/rcar/core.c | 4 +-- 2 files changed, 37 insertions(+), 38 deletions(-)
Signed-off-by: Uwe Kleine-König u.kleine-koenig@pengutronix.de --- sound/soc/sh/fsi.c | 69 +++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 35 deletions(-)
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index b593e28994d7..e949f0466eff 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1882,7 +1882,40 @@ static void fsi_handler_init(struct fsi_priv *fsi, } }
-static const struct of_device_id fsi_of_match[]; +static struct fsi_core fsi1_core = { + .ver = 1, + + /* Interrupt */ + .int_st = INT_ST, + .iemsk = IEMSK, + .imsk = IMSK, +}; + +static struct fsi_core fsi2_core = { + .ver = 2, + + /* Interrupt */ + .int_st = CPU_INT_ST, + .iemsk = CPU_IEMSK, + .imsk = CPU_IMSK, + .a_mclk = A_MST_CTLR, + .b_mclk = B_MST_CTLR, +}; + +static const struct of_device_id fsi_of_match[] = { + { .compatible = "renesas,sh_fsi", .data = &fsi1_core}, + { .compatible = "renesas,sh_fsi2", .data = &fsi2_core}, + {}, +}; +MODULE_DEVICE_TABLE(of, fsi_of_match); + +static struct platform_device_id fsi_id_table[] = { + { "sh_fsi", (kernel_ulong_t)&fsi1_core }, + { "sh_fsi2", (kernel_ulong_t)&fsi2_core }, + {}, +}; +MODULE_DEVICE_TABLE(platform, fsi_id_table); + static int fsi_probe(struct platform_device *pdev) { struct fsi_master *master; @@ -2080,40 +2113,6 @@ static struct dev_pm_ops fsi_pm_ops = { .resume = fsi_resume, };
-static struct fsi_core fsi1_core = { - .ver = 1, - - /* Interrupt */ - .int_st = INT_ST, - .iemsk = IEMSK, - .imsk = IMSK, -}; - -static struct fsi_core fsi2_core = { - .ver = 2, - - /* Interrupt */ - .int_st = CPU_INT_ST, - .iemsk = CPU_IEMSK, - .imsk = CPU_IMSK, - .a_mclk = A_MST_CTLR, - .b_mclk = B_MST_CTLR, -}; - -static const struct of_device_id fsi_of_match[] = { - { .compatible = "renesas,sh_fsi", .data = &fsi1_core}, - { .compatible = "renesas,sh_fsi2", .data = &fsi2_core}, - {}, -}; -MODULE_DEVICE_TABLE(of, fsi_of_match); - -static struct platform_device_id fsi_id_table[] = { - { "sh_fsi", (kernel_ulong_t)&fsi1_core }, - { "sh_fsi2", (kernel_ulong_t)&fsi2_core }, - {}, -}; -MODULE_DEVICE_TABLE(platform, fsi_id_table); - static struct platform_driver fsi_driver = { .driver = { .name = "fsi-pcm-audio",
On Tue, Mar 31, 2015 at 04:48:56PM +0200, Uwe Kleine-König wrote:
Signed-off-by: Uwe Kleine-König u.kleine-koenig@pengutronix.de
Applied, thanks.
A driver's platform_device_id and device data should and can be const.
Signed-off-by: Uwe Kleine-König u.kleine-koenig@pengutronix.de --- sound/soc/sh/fsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index e949f0466eff..c4d703274d7a 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1882,7 +1882,7 @@ static void fsi_handler_init(struct fsi_priv *fsi, } }
-static struct fsi_core fsi1_core = { +static const struct fsi_core fsi1_core = { .ver = 1,
/* Interrupt */ @@ -1891,7 +1891,7 @@ static struct fsi_core fsi1_core = { .imsk = IMSK, };
-static struct fsi_core fsi2_core = { +static const struct fsi_core fsi2_core = { .ver = 2,
/* Interrupt */ @@ -1909,7 +1909,7 @@ static const struct of_device_id fsi_of_match[] = { }; MODULE_DEVICE_TABLE(of, fsi_of_match);
-static struct platform_device_id fsi_id_table[] = { +static const struct platform_device_id fsi_id_table[] = { { "sh_fsi", (kernel_ulong_t)&fsi1_core }, { "sh_fsi2", (kernel_ulong_t)&fsi2_core }, {},
According to the file header only GPL v2 applies to it. Fix the MODULE_LICENSE parameter accordingly.
Signed-off-by: Uwe Kleine-König u.kleine-koenig@pengutronix.de --- sound/soc/sh/fsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index c4d703274d7a..142c066eaee2 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -2126,7 +2126,7 @@ static struct platform_driver fsi_driver = {
module_platform_driver(fsi_driver);
-MODULE_LICENSE("GPL"); +MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("SuperH onchip FSI audio driver"); MODULE_AUTHOR("Kuninori Morimoto morimoto.kuninori@renesas.com"); MODULE_ALIAS("platform:fsi-pcm-audio");
A driver's of_device_id and device data should and can be const.
Signed-off-by: Uwe Kleine-König u.kleine-koenig@pengutronix.de --- sound/soc/sh/rcar/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 3d8e4d60c83d..9f48d75fa992 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -99,11 +99,11 @@ #define RSND_RATES SNDRV_PCM_RATE_8000_96000 #define RSND_FMTS (SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE)
-static struct rsnd_of_data rsnd_of_data_gen1 = { +static const struct rsnd_of_data rsnd_of_data_gen1 = { .flags = RSND_GEN1, };
-static struct rsnd_of_data rsnd_of_data_gen2 = { +static const struct rsnd_of_data rsnd_of_data_gen2 = { .flags = RSND_GEN2, };
On Tue, Mar 31, 2015 at 04:48:59PM +0200, Uwe Kleine-König wrote:
A driver's of_device_id and device data should and can be const.
Signed-off-by: Uwe Kleine-König u.kleine-koenig@pengutronix.de
This patch is obsoleted by my patch sent with Message-Id: 20150331183509.GN17728@pengutronix.de [1].
Best regards Uwe
[1] http://mid.gmane.org/20150331183509.GN17728@pengutronix.de
On Tue, Mar 31, 2015 at 04:48:55PM +0200, Uwe Kleine-König wrote:
Mark said he already took patch 3, but that should not be a problem.
Please don't do this, it's confusing to get already applied patches resent and adds to the mail volume.
Patch 4 applied just fine to next, so this is just a resend.
This patch appears to be unrelated to the rest of the series :(
Hello Mark,
On Tue, Mar 31, 2015 at 05:19:24PM +0100, Mark Brown wrote:
On Tue, Mar 31, 2015 at 04:48:55PM +0200, Uwe Kleine-König wrote:
Mark said he already took patch 3, but that should not be a problem.
Please don't do this, it's confusing to get already applied patches resent and adds to the mail volume.
ok, I was lazy here.
Patch 4 applied just fine to next, so this is just a resend.
This patch appears to be unrelated to the rest of the series :( From my point of view it is related. Initially this series was a single
patch that made all of_device_ids const for ASoC. Then I split out the fsi changes because they were too heavy for a multi-driver patch. While doing this I noticed the license mismatch.
I assume I shouldn't resend patch 4 separately :-)
Best regards Uwe
On Tue, Mar 31, 2015 at 07:43:09PM +0200, Uwe Kleine-König wrote:
On Tue, Mar 31, 2015 at 05:19:24PM +0100, Mark Brown wrote:
Patch 4 applied just fine to next, so this is just a resend.
This patch appears to be unrelated to the rest of the series :(
From my point of view it is related. Initially this series was a single patch that made all of_device_ids const for ASoC. Then I split out the fsi changes because they were too heavy for a multi-driver patch. While doing this I noticed the license mismatch.
What I'm seeing here is a random patch series for fsi plus a big splat over the entire subsystem.
I assume I shouldn't resend patch 4 separately :-)
Indeed.
participants (2)
-
Mark Brown
-
Uwe Kleine-König