diff mbox

[GIT,PULL] ASoC updates for v3.16

Message ID s5ha99u5lc8.wl%tiwai@suse.de (mailing list archive)
State Accepted
Commit 16088cb6c02d0b766b9b8d7edff98da7f1c93205
Headers show

Commit Message

Takashi Iwai June 3, 2014, 10:38 a.m. UTC
At Tue, 03 Jun 2014 12:17:44 +0200,
Takashi Iwai wrote:
> 
> At Tue, 03 Jun 2014 11:55:46 +0200,
> Takashi Iwai wrote:
> > 
> > At Tue, 3 Jun 2014 10:46:45 +0100,
> > Mark Brown wrote:
> > > 
> > > The following changes since commit cee429e5c53f7ffc1dd500001d9dff567833c23d:
> > > 
> > >   Merge remote-tracking branches 'asoc/topic/ux500', 'asoc/topic/wm8731', 'asoc/topic/wm8804', 'asoc/topic/wm8955' and 'asoc/topic/wm8985' into asoc-next (2014-05-22 00:24:04 +0100)
> > > 
> > > are available in the git repository at:
> > > 
> > > 
> > >   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git asoc-v3.16-2
> > > 
> > > for you to fetch changes up to e1d4d3c854f25cff6c6c139588570e124d5e8fa4:
> > > 
> > >   ASoC: free jack GPIOs before the sound card is freed (2014-06-03 10:41:16 +0100)
> > > 
> > > ----------------------------------------------------------------
> > > ASoC: Final updates for v3.16
> > > 
> > > A few more updates from the last week of development, nothing too
> > > exciting.  Highlights include:
> > > 
> > > - GPIO descriptor support for jacks
> > > - More updates and fixes to the Freescale SSI, Intel and rsnd drivers.
> > > - New drivers for Analog Devices ADAU1361, ADAU1381, ADAU1761 and
> > >   ADAU1781, and Realtek RT5677.
> > 
> > Thanks, pulled now.
> 
> Now I get a few build warnings that look really buggy:
> 
> sound/soc/omap/omap-twl4030.c:274:2: warning: initialization from incompatible p
> ointer type [enabled by default]
> sound/soc/omap/omap-twl4030.c:274:2: warning: (near initialization for 'omap_twl
> 4030_card.remove') [enabled by default]
> 
> sound/soc/omap/rx51.c:379:2: warning: initialization from incompatible pointer t
> ype [enabled by default]
> sound/soc/omap/rx51.c:379:2: warning: (near initialization for 'rx51_sound_card.remove') [enabled by default]
> 
> They come from Stephen's patch, commit e1d4d3c8
>     ASoC: free jack GPIOs before the sound card is freed
> 
> The argument for remove callback should be struct snd_soc_card *.
> 
> Mark, aren't any fixes queued in your tree yet?

FWIW, below is a fix patch.  Only compile-tested.


Takashi

-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ASoC: Fix wrong argument for card remove callbacks

The commit [e1d4d3c8: ASoC: free jack GPIOs before the sound card is
freed] introduced snd_soc_card remove callbacks to a few drivers, but
they are implemented with a wrong argument type.  The callback should
receive snd_soc_card pointer instead of snd_soc_pcm_runtime.

Fixes: e1d4d3c854f2 ('ASoC: free jack GPIOs before the sound card is freed')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/omap/ams-delta.c         | 2 +-
 sound/soc/omap/omap-twl4030.c      | 3 +--
 sound/soc/omap/rx51.c              | 2 +-
 sound/soc/pxa/hx4700.c             | 2 +-
 sound/soc/samsung/h1940_uda1380.c  | 2 +-
 sound/soc/samsung/rx1950_uda1380.c | 4 ++--
 sound/soc/samsung/smartq_wm8987.c  | 2 +-
 7 files changed, 8 insertions(+), 9 deletions(-)

Comments

Mark Brown June 3, 2014, 10:50 a.m. UTC | #1
On Tue, Jun 03, 2014 at 12:38:47PM +0200, Takashi Iwai wrote:

> FWIW, below is a fix patch.  Only compile-tested.

Oh, I was just writing that but never mind.

Acked-by: Mark Brown <broonie@linaro.org>
Takashi Iwai June 3, 2014, 10:55 a.m. UTC | #2
At Tue, 3 Jun 2014 11:50:57 +0100,
Mark Brown wrote:
> 
> On Tue, Jun 03, 2014 at 12:38:47PM +0200, Takashi Iwai wrote:
> 
> > FWIW, below is a fix patch.  Only compile-tested.
> 
> Oh, I was just writing that but never mind.
> 
> Acked-by: Mark Brown <broonie@linaro.org>

OK, I applied the patch on top of for-next branch and pushed out now.
It's what I'm going to send a pull request, maybe tomorrow.
Meanwhile you can merge my for-next branch back to your asoc-next
branch.


thanks,

Takashi
Stephen Warren June 3, 2014, 4:20 p.m. UTC | #3
On 06/03/2014 04:38 AM, Takashi Iwai wrote:
> At Tue, 03 Jun 2014 12:17:44 +0200 Takashi Iwai wrote:
>> At Tue, 03 Jun 2014 11:55:46 +0200Takashi Iwai wrote:
>>> At Tue, 3 Jun 2014 10:46:45 +0100 Mark Brown wrote:
>>>>
>>>> The following changes since commit cee429e5c53f7ffc1dd500001d9dff567833c23d:
>>>>
>>>>   Merge remote-tracking branches 'asoc/topic/ux500', 'asoc/topic/wm8731', 'asoc/topic/wm8804', 'asoc/topic/wm8955' and 'asoc/topic/wm8985' into asoc-next (2014-05-22 00:24:04 +0100)
>>>>
>>>> are available in the git repository at:
>>>>
>>>>   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git asoc-v3.16-2
>>>>
>>>> for you to fetch changes up to e1d4d3c854f25cff6c6c139588570e124d5e8fa4:
>>>>
>>>>   ASoC: free jack GPIOs before the sound card is freed (2014-06-03 10:41:16 +0100)
>>>>
>>>> ----------------------------------------------------------------
>>>> ASoC: Final updates for v3.16
...
>> Now I get a few build warnings that look really buggy:
>>
>> sound/soc/omap/omap-twl4030.c:274:2: warning: initialization from incompatible p
>> ointer type [enabled by default]
>> sound/soc/omap/omap-twl4030.c:274:2: warning: (near initialization for 'omap_twl
>> 4030_card.remove') [enabled by default]
...
> FWIW, below is a fix patch.  Only compile-tested.
...
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH] ASoC: Fix wrong argument for card remove callbacks
> 
> The commit [e1d4d3c8: ASoC: free jack GPIOs before the sound card is
> freed] introduced snd_soc_card remove callbacks to a few drivers, but
> they are implemented with a wrong argument type.  The callback should
> receive snd_soc_card pointer instead of snd_soc_pcm_runtime.
> 
> Fixes: e1d4d3c854f2 ('ASoC: free jack GPIOs before the sound card is freed')
> Signed-off-by: Takashi Iwai <tiwai@suse.de>

Reviewed-by: Stephen Warren <swarren@nvidia.com>

Sorry about that. I had compiled ams-delta.c and even fixed some issues
I found because of that, but evidently didn't notice the warnings after
I changed from a per-dai_link callback to a per-card callback:-/
diff mbox

Patch

diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c
index 1f41951d8b7f..0cc41f94de4e 100644
--- a/sound/soc/omap/ams-delta.c
+++ b/sound/soc/omap/ams-delta.c
@@ -527,7 +527,7 @@  static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd)
 	return 0;
 }
 
-static int ams_delta_card_remove(struct snd_soc_pcm_runtime *rtd)
+static int ams_delta_card_remove(struct snd_soc_card *card)
 {
 	snd_soc_jack_free_gpios(&ams_delta_hook_switch,
 			ARRAY_SIZE(ams_delta_hook_switch_gpios),
diff --git a/sound/soc/omap/omap-twl4030.c b/sound/soc/omap/omap-twl4030.c
index b4e282871658..f8a6adc2d81c 100644
--- a/sound/soc/omap/omap-twl4030.c
+++ b/sound/soc/omap/omap-twl4030.c
@@ -231,9 +231,8 @@  static int omap_twl4030_init(struct snd_soc_pcm_runtime *rtd)
 	return ret;
 }
 
-static int omap_twl4030_card_remove(struct snd_soc_pcm_runtime *rtd)
+static int omap_twl4030_card_remove(struct snd_soc_card *card)
 {
-	struct snd_soc_card *card = rtd->card;
 	struct omap_twl4030 *priv = snd_soc_card_get_drvdata(card);
 
 	if (priv->jack_detect > 0)
diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c
index 47a10290535b..943922c79f78 100644
--- a/sound/soc/omap/rx51.c
+++ b/sound/soc/omap/rx51.c
@@ -334,7 +334,7 @@  static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd)
 	return err;
 }
 
-static int rx51_card_remove(struct snd_soc_pcm_runtime *rtd)
+static int rx51_card_remove(struct snd_soc_card *card)
 {
 	snd_soc_jack_free_gpios(&rx51_av_jack, ARRAY_SIZE(rx51_av_jack_gpios),
 				rx51_av_jack_gpios);
diff --git a/sound/soc/pxa/hx4700.c b/sound/soc/pxa/hx4700.c
index 6b81acaffddd..05559a725bec 100644
--- a/sound/soc/pxa/hx4700.c
+++ b/sound/soc/pxa/hx4700.c
@@ -152,7 +152,7 @@  static int hx4700_ak4641_init(struct snd_soc_pcm_runtime *rtd)
 	return err;
 }
 
-static int hx4700_card_remove(struct snd_soc_pcm_runtime *rtd)
+static int hx4700_card_remove(struct snd_soc_card *card)
 {
 	snd_soc_jack_free_gpios(&hs_jack, 1, &hs_jack_gpio);
 
diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c
index 720357f11a7f..f2d7980d7ddc 100644
--- a/sound/soc/samsung/h1940_uda1380.c
+++ b/sound/soc/samsung/h1940_uda1380.c
@@ -189,7 +189,7 @@  static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd)
 	return 0;
 }
 
-static int h1940_uda1380_card_remove(struct snd_soc_pcm_runtime *rtd)
+static int h1940_uda1380_card_remove(struct snd_soc_card *card)
 {
 	snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios),
 		hp_jack_gpios);
diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c
index 192aa9fc102f..37688ebbb2b4 100644
--- a/sound/soc/samsung/rx1950_uda1380.c
+++ b/sound/soc/samsung/rx1950_uda1380.c
@@ -31,7 +31,7 @@ 
 #include "s3c24xx-i2s.h"
 
 static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd);
-static int rx1950_uda1380_card_remove(struct snd_soc_pcm_runtime *rtd);
+static int rx1950_uda1380_card_remove(struct snd_soc_card *card);
 static int rx1950_startup(struct snd_pcm_substream *substream);
 static int rx1950_hw_params(struct snd_pcm_substream *substream,
 				struct snd_pcm_hw_params *params);
@@ -236,7 +236,7 @@  static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd)
 	return 0;
 }
 
-static int rx1950_uda1380_card_remove(struct snd_soc_pcm_runtime *rtd)
+static int rx1950_uda1380_card_remove(struct snd_soc_card *card)
 {
 	snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios),
 		hp_jack_gpios);
diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c
index 271a904277a1..9b0ffacab790 100644
--- a/sound/soc/samsung/smartq_wm8987.c
+++ b/sound/soc/samsung/smartq_wm8987.c
@@ -182,7 +182,7 @@  static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd)
 	return err;
 }
 
-static int smartq_wm8987_card_remove(struct snd_soc_pcm_runtime *rtd)
+static int smartq_wm8987_card_remove(struct snd_soc_card *card)
 {
 	snd_soc_jack_free_gpios(&smartq_jack, ARRAY_SIZE(smartq_jack_gpios),
 				smartq_jack_gpios);