Messages in this thread | | | Date | Tue, 20 Dec 2011 16:37:50 +1100 | From | NeilBrown <> | Subject | Re: [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] | |