]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
memstick: ms_block: fix compile issue
authorMaxim Levitsky <maximlevitsky@gmail.com>
Thu, 25 Oct 2012 01:14:35 +0000 (12:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 30 Oct 2012 04:15:04 +0000 (15:15 +1100)
As suggested by Geert Uytterhoeven:

: http://kisskb.ellerman.id.au/kisskb/buildresult/7280352/
: arch/m68k/include/asm/hardirq.h:23:20: error: expected ')' before 'DRIVER_NAME'
: make[4]: *** [drivers/memstick/core/ms_block.o] Error 1
:
: The reason for this is that pr_fmt() references DRIVER_NAME and is defined
: before the first include, while DRIVER_NAME is only defined in ms_block.h,
: which is the last included file.  If any subsequent include file uses
: pr_fmt() (e.g.  the call to pr_crit() in arch/m68k/include/asm/hardirq.h),
: this causes a build failure.
:
: I suggest moving the DRIVER_NAME define to ms_block.c.  Cfr.  memstick.c
: and mspro_block.c, who already have their own definition.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/memstick/core/ms_block.c
drivers/memstick/core/ms_block.h

index c815fe503e6302f9148557f239508fa5cd37f540..71e59376c0c313cbf7a2d773c49ce60d86bc76f4 100644 (file)
@@ -11,7 +11,7 @@
  * Copyright (C) 2007 Alex Dubov <oakad@yahoo.com>
  *
  */
-
+#define DRIVER_NAME "ms_block"
 #define pr_fmt(fmt) DRIVER_NAME ": " fmt
 
 #include <linux/module.h>
index a2b276519d58763abffa0490840b08c95e68b5f0..546b55e0e8597f18549e25185302bf1d7781ad7f 100644 (file)
@@ -277,8 +277,6 @@ static int msb_reset(struct msb_data *msb, bool full);
 static int h_msb_default_bad(struct memstick_dev *card,
                                                struct memstick_request **mrq);
 
-#define DRIVER_NAME "ms_block"
-
 #define __dbg(level, format, ...) \
        do { \
                if (debug >= level) \