* [PATCH] ASoC: ak4642: cleanup struct ak4642_priv
@ 2012-11-20 9:34 Kuninori Morimoto
2012-11-20 9:43 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Kuninori Morimoto @ 2012-11-20 9:34 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood, Kuninori Morimoto
This patch cleaned struct ak4642_priv which had
meaningless variable.
Current struct ak4642_priv doesn't have member variable,
but keep it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/ak4642.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index b3e24f2..3155b67 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -196,8 +196,6 @@ static const struct snd_soc_dapm_route ak4642_intercon[] = {
/* codec private data */
struct ak4642_priv {
- unsigned int sysclk;
- enum snd_soc_control_type control_type;
};
/*
@@ -468,10 +466,9 @@ static int ak4642_resume(struct snd_soc_codec *codec)
static int ak4642_probe(struct snd_soc_codec *codec)
{
- struct ak4642_priv *ak4642 = snd_soc_codec_get_drvdata(codec);
int ret;
- ret = snd_soc_codec_set_cache_io(codec, 8, 8, ak4642->control_type);
+ ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_I2C);
if (ret < 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
return ret;
@@ -532,7 +529,6 @@ static __devinit int ak4642_i2c_probe(struct i2c_client *i2c,
return -ENOMEM;
i2c_set_clientdata(i2c, ak4642);
- ak4642->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev,
(struct snd_soc_codec_driver *)id->driver_data,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: ak4642: cleanup struct ak4642_priv
2012-11-20 9:34 [PATCH] ASoC: ak4642: cleanup struct ak4642_priv Kuninori Morimoto
@ 2012-11-20 9:43 ` Mark Brown
2012-11-20 10:04 ` Kuninori Morimoto
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2012-11-20 9:43 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Simon, Liam Girdwood, Kuninori Morimoto
[-- Attachment #1.1: Type: text/plain, Size: 262 bytes --]
On Tue, Nov 20, 2012 at 01:34:46AM -0800, Kuninori Morimoto wrote:
> This patch cleaned struct ak4642_priv which had
> meaningless variable.
> Current struct ak4642_priv doesn't have member variable,
> but keep it.
If it's become empty why not just remove it?
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: ak4642: cleanup struct ak4642_priv
2012-11-20 9:43 ` Mark Brown
@ 2012-11-20 10:04 ` Kuninori Morimoto
2012-11-20 10:38 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Kuninori Morimoto @ 2012-11-20 10:04 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood, Kuninori Morimoto
Hi Mark
> > This patch cleaned struct ak4642_priv which had
> > meaningless variable.
> > Current struct ak4642_priv doesn't have member variable,
> > but keep it.
>
> If it's become empty why not just remove it?
Not big reason.
I thought that it was easy if someone adds new member variable for it.
If you want, I can send v2 patch which don't have it.
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: ak4642: cleanup struct ak4642_priv
2012-11-20 10:04 ` Kuninori Morimoto
@ 2012-11-20 10:38 ` Mark Brown
2012-11-21 4:24 ` [PATCH v2] " Kuninori Morimoto
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2012-11-20 10:38 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Simon, Liam Girdwood, Kuninori Morimoto
[-- Attachment #1.1: Type: text/plain, Size: 138 bytes --]
On Tue, Nov 20, 2012 at 02:04:37AM -0800, Kuninori Morimoto wrote:
> If you want, I can send v2 patch which don't have it.
Yes, please.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] ASoC: ak4642: cleanup struct ak4642_priv
2012-11-20 10:38 ` Mark Brown
@ 2012-11-21 4:24 ` Kuninori Morimoto
2012-11-21 4:27 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Kuninori Morimoto @ 2012-11-21 4:24 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood, Kuninori Morimoto
This patch removed struct ak4642_priv which had
meaningless variable.
It is no longer needed
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2
- fixup log comment
- removed struct ak4642_priv
sound/soc/codecs/ak4642.c | 23 ++---------------------
1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index b3e24f2..546466a 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -194,12 +194,6 @@ static const struct snd_soc_dapm_route ak4642_intercon[] = {
{"LINEOUT Mixer", "DACL", "DAC"},
};
-/* codec private data */
-struct ak4642_priv {
- unsigned int sysclk;
- enum snd_soc_control_type control_type;
-};
-
/*
* ak4642 register cache
*/
@@ -468,10 +462,9 @@ static int ak4642_resume(struct snd_soc_codec *codec)
static int ak4642_probe(struct snd_soc_codec *codec)
{
- struct ak4642_priv *ak4642 = snd_soc_codec_get_drvdata(codec);
int ret;
- ret = snd_soc_codec_set_cache_io(codec, 8, 8, ak4642->control_type);
+ ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_I2C);
if (ret < 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
return ret;
@@ -523,21 +516,9 @@ static struct snd_soc_codec_driver soc_codec_dev_ak4648 = {
static __devinit int ak4642_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
- struct ak4642_priv *ak4642;
- int ret;
-
- ak4642 = devm_kzalloc(&i2c->dev, sizeof(struct ak4642_priv),
- GFP_KERNEL);
- if (!ak4642)
- return -ENOMEM;
-
- i2c_set_clientdata(i2c, ak4642);
- ak4642->control_type = SND_SOC_I2C;
-
- ret = snd_soc_register_codec(&i2c->dev,
+ return snd_soc_register_codec(&i2c->dev,
(struct snd_soc_codec_driver *)id->driver_data,
&ak4642_dai, 1);
- return ret;
}
static __devexit int ak4642_i2c_remove(struct i2c_client *client)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] ASoC: ak4642: cleanup struct ak4642_priv
2012-11-21 4:24 ` [PATCH v2] " Kuninori Morimoto
@ 2012-11-21 4:27 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2012-11-21 4:27 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Simon, Liam Girdwood, Kuninori Morimoto
[-- Attachment #1.1: Type: text/plain, Size: 184 bytes --]
On Tue, Nov 20, 2012 at 08:24:10PM -0800, Kuninori Morimoto wrote:
> This patch removed struct ak4642_priv which had
> meaningless variable.
> It is no longer needed
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-11-21 4:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-20 9:34 [PATCH] ASoC: ak4642: cleanup struct ak4642_priv Kuninori Morimoto
2012-11-20 9:43 ` Mark Brown
2012-11-20 10:04 ` Kuninori Morimoto
2012-11-20 10:38 ` Mark Brown
2012-11-21 4:24 ` [PATCH v2] " Kuninori Morimoto
2012-11-21 4:27 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.