Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965302AbbFJPhk (ORCPT ); Wed, 10 Jun 2015 11:37:40 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:36028 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754311AbbFJP2H (ORCPT ); Wed, 10 Jun 2015 11:28:07 -0400 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Chen Gang , Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH 3.12 086/111] drivers: staging: dgap: move DG_NAME and DG_PART from "Makefile" to "dgap_driver.h" Date: Wed, 10 Jun 2015 17:27:15 +0200 Message-Id: X-Mailer: git-send-email 2.4.2 In-Reply-To: <93091169a673f49c2574cddf1ef858cf0704f646.1433943052.git.jslaby@suse.cz> References: <93091169a673f49c2574cddf1ef858cf0704f646.1433943052.git.jslaby@suse.cz> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2119 Lines: 60 From: Chen Gang 3.12-stable review patch. If anyone has any objections, please let me know. =============== 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 --- drivers/staging/dgap/Makefile | 2 -- drivers/staging/dgap/dgap_driver.h | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/dgap/Makefile b/drivers/staging/dgap/Makefile index 9f1fce157c77..3abe8d2bb748 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 b1cf489a729c..1742f4071e4d 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 -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/