From: Chen Gang Date: Sat, 21 Sep 2013 12:38:30 +0000 (+0800) Subject: drivers: staging: dgap: move DG_NAME and DG_PART from "Makefile" to "dgap_driver.h" X-Git-Tag: v3.12.44~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5b7aee1b3f1a0263b2c9266ecf08b5293e13139;p=thirdparty%2Fkernel%2Fstable.git drivers: staging: dgap: move DG_NAME and DG_PART from "Makefile" to "dgap_driver.h" commit 6319c61aecc7acaf39a1dc0e81a8aac6a17499ee upstream. Normally, the macros from command line are system specific macros (e.g __linux, __KERNEL__ ...), and module own macros are usually defined in their header files. DG_NAME and DG_PART are driver 'dgap' owned macros which are used by multiple files within driver, and need be defined in the driver main header file. So move DG_NAME and DG_PART to "dgap_driver.h", it not only can make code clearer, but also can avoid compiling failure when EXTRA_CFLAGS appended to make command line (e.g. "EXTRA_CFLAGS=-W"). Signed-off-by: Chen Gang Signed-off-by: Greg Kroah-Hartman Signed-off-by: Jiri Slaby --- diff --git a/drivers/staging/dgap/Makefile b/drivers/staging/dgap/Makefile index 9f1fce157c771..3abe8d2bb748b 100644 --- a/drivers/staging/dgap/Makefile +++ b/drivers/staging/dgap/Makefile @@ -1,5 +1,3 @@ -EXTRA_CFLAGS += -DDG_NAME=\"dgap-1.3-16\" -DDG_PART=\"40002347_C\" - obj-$(CONFIG_DGAP) += dgap.o diff --git a/drivers/staging/dgap/dgap_driver.h b/drivers/staging/dgap/dgap_driver.h index b1cf489a729c8..1742f4071e4d0 100644 --- a/drivers/staging/dgap/dgap_driver.h +++ b/drivers/staging/dgap/dgap_driver.h @@ -53,6 +53,9 @@ * DPR((fmt, args, ...)); Only prints if DGAP_TRACER is defined at * compile time and dgap_debug!=0 */ +#define DG_NAME "dgap-1.3-16" +#define DG_PART "40002347_C" + #define PROCSTR "dgap" /* /proc entries */ #define DEVSTR "/dev/dg/dgap" /* /dev entries */ #define DRVSTR "dgap" /* Driver name string