[PATCH 09/39] pcmcia: don't add extra DEBUG cflag

Larry Finger Larry.Finger at lwfinger.net
Wed Aug 20 15:43:04 EDT 2008


Dominik Brodowski wrote:
> Use CONFIG_PCMCIA_DEBUG instead of DEBUG so that dev_dbg() and other tricks
> work properly.
> 
> Signed-off-by: Dominik Broodwski <linux at dominikbrodowski.net>
> Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
> ---
>  drivers/pcmcia/Makefile          |    4 ----
>  drivers/pcmcia/cs_internal.h     |    2 +-
>  drivers/pcmcia/m32r_cfc.c        |    2 +-
>  drivers/pcmcia/m32r_pcc.c        |    2 +-
>  drivers/pcmcia/m8xx_pcmcia.c     |    4 ++--
>  drivers/pcmcia/pcmcia_ioctl.c    |    2 +-
>  drivers/pcmcia/pcmcia_resource.c |    2 +-
>  drivers/pcmcia/soc_common.c      |    2 +-
>  drivers/pcmcia/tcic.c            |    2 +-
>  9 files changed, 9 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
> index 269a9e9..2ea5d46 100644
> --- a/drivers/pcmcia/Makefile
> +++ b/drivers/pcmcia/Makefile
> @@ -2,10 +2,6 @@
>  # Makefile for the kernel pcmcia subsystem (c/o David Hinds)
>  #
>  
> -ifeq ($(CONFIG_PCMCIA_DEBUG),y)
> -EXTRA_CFLAGS += -DDEBUG
> -endif
> -
>  pcmcia_core-y					+= cs.o cistpl.o rsrc_mgr.o socket_sysfs.o
>  pcmcia_core-$(CONFIG_CARDBUS)			+= cardbus.o
>  obj-$(CONFIG_PCCARD)				+= pcmcia_core.o
> diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h
> index fe7d729..2b94ab7 100644
> --- a/drivers/pcmcia/cs_internal.h
> +++ b/drivers/pcmcia/cs_internal.h
> @@ -132,7 +132,7 @@ int pccard_register_pcmcia(struct pcmcia_socket *s, struct pcmcia_callback *c);
>  
>  #define cs_socket_name(skt)	((skt)->dev.bus_id)
>  
> -#ifdef DEBUG
> +#ifdef PCMCIA_DEBUG

This one needs to be CONFIG_PCMCIA_DEBUG, otherwise a build with 
debugging enabled fails with a missing global.

The following hunk, which you sent as 39/39, needs to be here to have 
success with the build:

Index: wireless-testing/drivers/pcmcia/m32r_cfc.c
===================================================================
--- wireless-testing.orig/drivers/pcmcia/m32r_cfc.c     2008-08-19 
22:28:24.000000000 -0500
+++ wireless-testing/drivers/pcmcia/m32r_cfc.c  2008-08-19 
23:17:12.000000000 -0500
@@ -505,7 +505,7 @@
                 pcc_set(sock,(unsigned int)PLD_CFBUFCR,1);
         }

-#ifdef DEBUG
+#ifdef CONFIG_PCMCIA_DEBUG
         if(state->flags & SS_IOCARD){
                 debug(3, ":IOCARD");
         }


Larry



More information about the linux-pcmcia mailing list