lkml.org 
[lkml]   [2011]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] leds-tca6507: allow driver to compile when GPIOLIB is not available.
On Mon, 19 Dec 2011 12:34:18 -0800 Randy Dunlap <rdunlap@xenotime.net> wrote:

> On 12/18/2011 04:20 PM, NeilBrown wrote:
> > This driver can configure the outputs as GPIO line instead of LEDs. But
> > that only works if GPIOLIB is available. So make that code conditional
> > on the library's availability.
> >
> > Also remove the 'teardown' callback as it is never called and should
> > never be needed.
> >
> > Reported-by: Randy Dunlap <rdunlap@xenotime.net>,
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>,
> > Signed-off-by: NeilBrown <neilb@suse.de>
>
> Hi Neil,
>
> with linux-next 20111219 and this patch applied, I now get:
>
> drivers/leds/leds-tca6507.c: In function 'tca6507_remove':
> drivers/leds/leds-tca6507.c:677:9: error: 'struct tca6507_chip' has no member named 'gpio'
> drivers/leds/leds-tca6507.c:678:3: error: implicit declaration of function 'gpiochip_remove'
> drivers/leds/leds-tca6507.c:678:33: error: 'struct tca6507_chip' has no member named 'gpio'
>
> when GPIOLIB is not enabled.

Drat - I forgot the 'remove' code.

I cannot easily compile for an ARCH that doesn't include GPIOLIB, but it
seems that if I put
#undef CONFIG_GPIOLIB
at the top of leds-tca6507.c it comes close enough for testing.
So the next version should get that right. I'll repost.

Thanks,
NeilBrown


[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2011-12-20 06:41    [W:0.065 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site