alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] ASoC: fsi: reorder code to make a forward declaration superfluous
@ 2015-03-29 19:47 Uwe Kleine-König
  2015-03-29 19:47 ` [PATCH 2/4] ASoC: fsi: mark several data structures as const Uwe Kleine-König
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2015-03-29 19:47 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, alsa-devel; +Cc: Oder Chiou, Bard Liao, kernel

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 b87b22e88e43..dab6aa661a22 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1876,7 +1876,40 @@ static void fsi_handler_init(struct fsi_priv *fsi,
 	}
 }
 
-static 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 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;
@@ -2072,40 +2105,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 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",
-- 
2.1.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] ASoC: fsi: mark several data structures as const
  2015-03-29 19:47 [PATCH 1/4] ASoC: fsi: reorder code to make a forward declaration superfluous Uwe Kleine-König
@ 2015-03-29 19:47 ` Uwe Kleine-König
  2015-03-31 13:32   ` Mark Brown
  2015-03-29 19:47 ` [PATCH 3/4] ASoC: fsi: fix license specification Uwe Kleine-König
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Uwe Kleine-König @ 2015-03-29 19:47 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, alsa-devel; +Cc: Oder Chiou, Bard Liao, kernel

A driver's platform_device_id, 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/fsi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index dab6aa661a22..5827c0eb6b90 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1876,7 +1876,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 */
@@ -1885,7 +1885,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 */
@@ -1896,14 +1896,14 @@ static struct fsi_core fsi2_core = {
 	.b_mclk	= B_MST_CTLR,
 };
 
-static struct of_device_id fsi_of_match[] = {
+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[] = {
+static const struct platform_device_id fsi_id_table[] = {
 	{ "sh_fsi",	(kernel_ulong_t)&fsi1_core },
 	{ "sh_fsi2",	(kernel_ulong_t)&fsi2_core },
 	{},
-- 
2.1.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] ASoC: fsi: fix license specification
  2015-03-29 19:47 [PATCH 1/4] ASoC: fsi: reorder code to make a forward declaration superfluous Uwe Kleine-König
  2015-03-29 19:47 ` [PATCH 2/4] ASoC: fsi: mark several data structures as const Uwe Kleine-König
@ 2015-03-29 19:47 ` Uwe Kleine-König
  2015-03-31 13:32   ` Mark Brown
  2015-03-29 19:47 ` [PATCH 4/4] ASoC: mark of_device_id and device data as constant Uwe Kleine-König
  2015-03-31 13:31 ` [PATCH 1/4] ASoC: fsi: reorder code to make a forward declaration superfluous Mark Brown
  3 siblings, 1 reply; 7+ messages in thread
From: Uwe Kleine-König @ 2015-03-29 19:47 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, alsa-devel; +Cc: Oder Chiou, Bard Liao, kernel

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 5827c0eb6b90..0c2af21b0b82 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -2118,7 +2118,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");
-- 
2.1.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] ASoC: mark of_device_id and device data as constant
  2015-03-29 19:47 [PATCH 1/4] ASoC: fsi: reorder code to make a forward declaration superfluous Uwe Kleine-König
  2015-03-29 19:47 ` [PATCH 2/4] ASoC: fsi: mark several data structures as const Uwe Kleine-König
  2015-03-29 19:47 ` [PATCH 3/4] ASoC: fsi: fix license specification Uwe Kleine-König
@ 2015-03-29 19:47 ` Uwe Kleine-König
  2015-03-31 13:31 ` [PATCH 1/4] ASoC: fsi: reorder code to make a forward declaration superfluous Mark Brown
  3 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2015-03-29 19:47 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, alsa-devel; +Cc: Oder Chiou, Bard Liao, kernel

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/codecs/ak4554.c           | 2 +-
 sound/soc/codecs/rt5631.c           | 2 +-
 sound/soc/fsl/mpc5200_psc_ac97.c    | 2 +-
 sound/soc/fsl/mpc5200_psc_i2s.c     | 2 +-
 sound/soc/fsl/pcm030-audio-fabric.c | 2 +-
 sound/soc/kirkwood/kirkwood-i2s.c   | 2 +-
 sound/soc/sh/rcar/core.c            | 6 +++---
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/sound/soc/codecs/ak4554.c b/sound/soc/codecs/ak4554.c
index 16ce9f9fefa1..298dedc05140 100644
--- a/sound/soc/codecs/ak4554.c
+++ b/sound/soc/codecs/ak4554.c
@@ -84,7 +84,7 @@ static int ak4554_soc_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id ak4554_of_match[] = {
+static const struct of_device_id ak4554_of_match[] = {
 	{ .compatible = "asahi-kasei,ak4554" },
 	{},
 };
diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index c61852742ee3..2c10d77727af 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -1675,7 +1675,7 @@ static const struct i2c_device_id rt5631_i2c_id[] = {
 MODULE_DEVICE_TABLE(i2c, rt5631_i2c_id);
 
 #ifdef CONFIG_OF
-static struct of_device_id rt5631_i2c_dt_ids[] = {
+static const struct of_device_id rt5631_i2c_dt_ids[] = {
 	{ .compatible = "realtek,rt5631"},
 	{ .compatible = "realtek,alc5631"},
 	{ }
diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c
index 08d2a8069b0a..0bab76051fd8 100644
--- a/sound/soc/fsl/mpc5200_psc_ac97.c
+++ b/sound/soc/fsl/mpc5200_psc_ac97.c
@@ -326,7 +326,7 @@ static int psc_ac97_of_remove(struct platform_device *op)
 }
 
 /* Match table for of_platform binding */
-static struct of_device_id psc_ac97_match[] = {
+static const struct of_device_id psc_ac97_match[] = {
 	{ .compatible = "fsl,mpc5200-psc-ac97", },
 	{ .compatible = "fsl,mpc5200b-psc-ac97", },
 	{}
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c
index 51fb0c00fe73..d8232943ccb6 100644
--- a/sound/soc/fsl/mpc5200_psc_i2s.c
+++ b/sound/soc/fsl/mpc5200_psc_i2s.c
@@ -217,7 +217,7 @@ static int psc_i2s_of_remove(struct platform_device *op)
 }
 
 /* Match table for of_platform binding */
-static struct of_device_id psc_i2s_match[] = {
+static const struct of_device_id psc_i2s_match[] = {
 	{ .compatible = "fsl,mpc5200-psc-i2s", },
 	{ .compatible = "fsl,mpc5200b-psc-i2s", },
 	{}
diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c
index c44459d24c50..ec731223cab3 100644
--- a/sound/soc/fsl/pcm030-audio-fabric.c
+++ b/sound/soc/fsl/pcm030-audio-fabric.c
@@ -113,7 +113,7 @@ static int pcm030_fabric_remove(struct platform_device *op)
 	return ret;
 }
 
-static struct of_device_id pcm030_audio_match[] = {
+static const struct of_device_id pcm030_audio_match[] = {
 	{ .compatible = "phytec,pcm030-audio-fabric", },
 	{}
 };
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index d19483081f9b..3a36d60e1785 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -643,7 +643,7 @@ static int kirkwood_i2s_dev_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_OF
-static struct of_device_id mvebu_audio_of_match[] = {
+static const struct of_device_id mvebu_audio_of_match[] = {
 	{ .compatible = "marvell,kirkwood-audio" },
 	{ .compatible = "marvell,dove-audio" },
 	{ .compatible = "marvell,armada370-audio" },
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 110577c52317..6f85c157b9ac 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -100,15 +100,15 @@
 #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,
 };
 
-static struct of_device_id rsnd_of_match[] = {
+static const struct of_device_id rsnd_of_match[] = {
 	{ .compatible = "renesas,rcar_sound-gen1", .data = &rsnd_of_data_gen1 },
 	{ .compatible = "renesas,rcar_sound-gen2", .data = &rsnd_of_data_gen2 },
 	{},
-- 
2.1.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/4] ASoC: fsi: reorder code to make a forward declaration superfluous
  2015-03-29 19:47 [PATCH 1/4] ASoC: fsi: reorder code to make a forward declaration superfluous Uwe Kleine-König
                   ` (2 preceding siblings ...)
  2015-03-29 19:47 ` [PATCH 4/4] ASoC: mark of_device_id and device data as constant Uwe Kleine-König
@ 2015-03-31 13:31 ` Mark Brown
  3 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2015-03-31 13:31 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Oder Chiou, Bard Liao, alsa-devel, Liam Girdwood, kernel


[-- Attachment #1.1: Type: text/plain, Size: 204 bytes --]

On Sun, Mar 29, 2015 at 09:47:14PM +0200, Uwe Kleine-König wrote:
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

This doesn't apply against current code, please check and resend.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/4] ASoC: fsi: mark several data structures as const
  2015-03-29 19:47 ` [PATCH 2/4] ASoC: fsi: mark several data structures as const Uwe Kleine-König
@ 2015-03-31 13:32   ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2015-03-31 13:32 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Oder Chiou, Bard Liao, alsa-devel, Liam Girdwood, kernel


[-- Attachment #1.1: Type: text/plain, Size: 227 bytes --]

On Sun, Mar 29, 2015 at 09:47:15PM +0200, Uwe Kleine-König wrote:
> A driver's platform_device_id, of_device_id and device data should and
> can be const.

This doesn't apply against current code, please check and resend.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/4] ASoC: fsi: fix license specification
  2015-03-29 19:47 ` [PATCH 3/4] ASoC: fsi: fix license specification Uwe Kleine-König
@ 2015-03-31 13:32   ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2015-03-31 13:32 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Oder Chiou, Bard Liao, alsa-devel, Liam Girdwood, kernel


[-- Attachment #1.1: Type: text/plain, Size: 195 bytes --]

On Sun, Mar 29, 2015 at 09:47:16PM +0200, Uwe Kleine-König wrote:
> According to the file header only GPL v2 applies to it. Fix the
> MODULE_LICENSE parameter accordingly.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-31 13:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-29 19:47 [PATCH 1/4] ASoC: fsi: reorder code to make a forward declaration superfluous Uwe Kleine-König
2015-03-29 19:47 ` [PATCH 2/4] ASoC: fsi: mark several data structures as const Uwe Kleine-König
2015-03-31 13:32   ` Mark Brown
2015-03-29 19:47 ` [PATCH 3/4] ASoC: fsi: fix license specification Uwe Kleine-König
2015-03-31 13:32   ` Mark Brown
2015-03-29 19:47 ` [PATCH 4/4] ASoC: mark of_device_id and device data as constant Uwe Kleine-König
2015-03-31 13:31 ` [PATCH 1/4] ASoC: fsi: reorder code to make a forward declaration superfluous Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).