linux-next: sound tree build failure

7 messages, 4 authors, 2009-07-17 · open the first message on its own page

linux-next: sound tree build failure

From: Stephen Rothwell <hidden>
Date: 2009-07-17 01:29:44

Hi Takashi,

Today's linux-next build (x86_64 allmodconfig) failed like this:

sound/soc/codecs/ad1938.c: In function 'ad1938_spi_probe':
sound/soc/codecs/ad1938.c:423: error: 'struct device' has no member named 'driver_data'
sound/soc/codecs/ad1938.c: In function 'ad1938_spi_remove':
sound/soc/codecs/ad1938.c:430: error: 'struct device' has no member named 'driver_data'

Caused by commit 1274738d85d0e25c4f82d83f50a6bcbe2397e9ea ("ASoC: new
ad1938 codec driver based on asoc") interacting with commit
2e34003ff6237e2216396d61dc8b32ea5959de80 ("Driver core: move
dev_get/set_drvdata to drivers/base/dd.c") from the driver-core.current
tree (which will, I assume, be sent to Linus shortly - right, Greg?).

New drivers need to use the (existing) API's dev_{set,get}_drvdata().

I have used the version of the sound tree from next-20090716 for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Re: linux-next: sound tree build failure

From: Greg KH <hidden>
Date: 2009-07-17 05:00:44

On Fri, Jul 17, 2009 at 11:29:35AM +1000, Stephen Rothwell wrote:
Hi Takashi,

Today's linux-next build (x86_64 allmodconfig) failed like this:

sound/soc/codecs/ad1938.c: In function 'ad1938_spi_probe':
sound/soc/codecs/ad1938.c:423: error: 'struct device' has no member named 'driver_data'
sound/soc/codecs/ad1938.c: In function 'ad1938_spi_remove':
sound/soc/codecs/ad1938.c:430: error: 'struct device' has no member named 'driver_data'

Caused by commit 1274738d85d0e25c4f82d83f50a6bcbe2397e9ea ("ASoC: new
ad1938 codec driver based on asoc") interacting with commit
2e34003ff6237e2216396d61dc8b32ea5959de80 ("Driver core: move
dev_get/set_drvdata to drivers/base/dd.c") from the driver-core.current
tree (which will, I assume, be sent to Linus shortly - right, Greg?).
It turned out to be "too late" to make the change, I missed the -rc2
window, so it will be a .32 thing.

I'll move it from my driver-core.current to my driver-core tree to clear
up any confusion.

But yes, the apis should be used instead of directly accessing the
fields.

thanks,

greg k-h

Re: linux-next: sound tree build failure

From: Stephen Rothwell <hidden>
Date: 2009-07-17 05:32:52

Hi Greg,

On Thu, 16 Jul 2009 21:56:20 -0700 Greg KH [off-list ref] wrote:
It turned out to be "too late" to make the change, I missed the -rc2
window, so it will be a .32 thing.

I'll move it from my driver-core.current to my driver-core tree to clear
up any confusion.
OK, thanks.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Re: linux-next: sound tree build failure

From: Takashi Iwai <hidden>
Date: 2009-07-17 09:28:01

At Fri, 17 Jul 2009 11:29:35 +1000,
Stephen Rothwell wrote:
[1  <text/plain; US-ASCII (quoted-printable)>]
Hi Takashi,

Today's linux-next build (x86_64 allmodconfig) failed like this:

sound/soc/codecs/ad1938.c: In function 'ad1938_spi_probe':
sound/soc/codecs/ad1938.c:423: error: 'struct device' has no member named 'driver_data'
sound/soc/codecs/ad1938.c: In function 'ad1938_spi_remove':
sound/soc/codecs/ad1938.c:430: error: 'struct device' has no member named 'driver_data'

Caused by commit 1274738d85d0e25c4f82d83f50a6bcbe2397e9ea ("ASoC: new
ad1938 codec driver based on asoc") interacting with commit
2e34003ff6237e2216396d61dc8b32ea5959de80 ("Driver core: move
dev_get/set_drvdata to drivers/base/dd.c") from the driver-core.current
tree (which will, I assume, be sent to Linus shortly - right, Greg?).

New drivers need to use the (existing) API's dev_{set,get}_drvdata().
Yep.  Fixed now.

I have used the version of the sound tree from next-20090716 for today.

thanks,

Takashi

Re: linux-next: sound tree build failure

From: Mark Brown <hidden>
Date: 2009-07-17 09:28:29

On Fri, Jul 17, 2009 at 11:29:35AM +1000, Stephen Rothwell wrote:
Caused by commit 1274738d85d0e25c4f82d83f50a6bcbe2397e9ea ("ASoC: new
ad1938 codec driver based on asoc") interacting with commit
2e34003ff6237e2216396d61dc8b32ea5959de80 ("Driver core: move
dev_get/set_drvdata to drivers/base/dd.c") from the driver-core.current
tree (which will, I assume, be sent to Linus shortly - right, Greg?).
I've fixed this.
New drivers need to use the (existing) API's dev_{set,get}_drvdata().
Incidentally, is there any great reason not to have the equivalent thing
for platform data?  I can supply a patch.
From 91a0351b2d1e86f421ee9c95d07136f648d2da06 Mon Sep 17 00:00:00 2001
From: Mark Brown <redacted>
Date: Fri, 17 Jul 2009 10:18:14 +0100
Subject: [PATCH] ASoC: Use driverdata accessors in ad1938

Signed-off-by: Mark Brown <redacted>
---
 sound/soc/codecs/ad1938.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/ad1938.c b/sound/soc/codecs/ad1938.c
index 3dc8091..5a7d00c 100644
--- a/sound/soc/codecs/ad1938.c
+++ b/sound/soc/codecs/ad1938.c
@@ -420,14 +420,14 @@ static int __devinit ad1938_spi_probe(struct spi_device *spi)
 	codec->control_data = spi;
 	codec->dev = &spi->dev;
 
-	spi->dev.driver_data = ad1938;
+	dev_set_drvdata(&spi->dev, ad1938);
 
 	return ad1938_register(ad1938);
 }
 
 static int __devexit ad1938_spi_remove(struct spi_device *spi)
 {
-	struct ad1938_priv *ad1938 = spi->dev.driver_data;
+	struct ad1938_priv *ad1938 = dev_get_drvdata(&spi->dev);
 
 	ad1938_unregister(ad1938);
 	return 0;
-- 
1.6.3.3

Re: linux-next: sound tree build failure

From: Takashi Iwai <hidden>
Date: 2009-07-17 09:32:03

At Fri, 17 Jul 2009 10:28:25 +0100,
Mark Brown wrote:
On Fri, Jul 17, 2009 at 11:29:35AM +1000, Stephen Rothwell wrote:
quoted
Caused by commit 1274738d85d0e25c4f82d83f50a6bcbe2397e9ea ("ASoC: new
ad1938 codec driver based on asoc") interacting with commit
2e34003ff6237e2216396d61dc8b32ea5959de80 ("Driver core: move
dev_get/set_drvdata to drivers/base/dd.c") from the driver-core.current
tree (which will, I assume, be sent to Linus shortly - right, Greg?).
I've fixed this.
Oh, it was already fixed this morning.
I couldn't send a notify mail just because my server crashed after
pushing the tree...   And rebooted now :)


Takashi

Re: linux-next: sound tree build failure

From: Greg KH <hidden>
Date: 2009-07-17 16:28:34

On Fri, Jul 17, 2009 at 03:32:43PM +1000, Stephen Rothwell wrote:
Hi Greg,

On Thu, 16 Jul 2009 21:56:20 -0700 Greg KH [off-list ref] wrote:
quoted
It turned out to be "too late" to make the change, I missed the -rc2
window, so it will be a .32 thing.

I'll move it from my driver-core.current to my driver-core tree to clear
up any confusion.
OK, thanks.
Now done.

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help