Skip to contentSkip to conversation

Remove duplicate definitions

PATCH In review Sanjeev Premi 2 participants 3 messages Jun 16, 2009 – Jun 17, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove duplicate definitions

Fixes the duplicate definitions of KEY and PERSISTENT_KEY leading to these compile-time warnings:

In file included from arch/arm/mach-omap2/board-omap3evm.c:39:
arch/arm/plat-omap/include/mach/keypad.h:38:1: warning: "KEY" redefined
In file included from arch/arm/mach-omap2/board-omap3evm.c:27:
include/linux/i2c/twl4030.h:341:1: warning: this is the location of the previous definition In file included from arch/arm/mach-omap2/board-omap3evm.c:39:
arch/arm/plat-omap/include/mach/keypad.h:39:1: warning: "PERSISTENT_KEY" redefined In file included from arch/arm/mach-omap2/board-omap3evm.c:27:
include/linux/i2c/twl4030.h:342:1: warning: this is the location of the previous definition

---
 include/linux/i2c/twl4030.h |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
include/linux/i2c/twl4030.h +0 -8
index 87accda..21e65bf 100644
@@ -333,14 +333,6 @@ struct twl4030_madc_platform_data {
 	int		irq_line;
 };
 
-/* Boards have uniqe mappings of {col, row} --> keycode.
- * Column and row are 4 bits, but range only from 0..7;
- * a PERSISTENT_KEY is "always on" and never reported.
- */
-#define KEY_PERSISTENT		0x00800000
-#define KEY(col, row, keycode)	(((col) << 28) | ((row) << 24) | (keycode))
-#define PERSISTENT_KEY(c, r)	KEY(c, r, KEY_PERSISTENT)
-
 struct twl4030_keypad_data {
 	unsigned rows;
 	unsigned cols;
Signature · 1 line
1.6.2.2
#1 lore raw
Quoted 11 lines · Sanjeev Premi

Fixes the duplicate definitions of KEY and PERSISTENT_KEY leading to these compile-time warnings:

In file included from arch/arm/mach-omap2/board-omap3evm.c:39:
arch/arm/plat-omap/include/mach/keypad.h:38:1: warning: "KEY" redefined
In file included from arch/arm/mach-omap2/board-omap3evm.c:27:
include/linux/i2c/twl4030.h:341:1: warning: this is the location of the previous definition In file included from arch/arm/mach-omap2/board-omap3evm.c:39:
arch/arm/plat-omap/include/mach/keypad.h:39:1: warning: "PERSISTENT_KEY" redefined In file included from arch/arm/mach-omap2/board-omap3evm.c:27:
include/linux/i2c/twl4030.h:342:1: warning: this is the location of the previous definition

Hmm, I think we should rather remove these from keypad.h. Will queue a patch into omap-fixes for that.

Tony

Quoted 31 lines
---
 include/linux/i2c/twl4030.h |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
include/linux/i2c/twl4030.h +0 -8
index 87accda..21e65bf 100644
@@ -333,14 +333,6 @@ struct twl4030_madc_platform_data {
 	int		irq_line;
 };
 
-/* Boards have uniqe mappings of {col, row} --> keycode.
- * Column and row are 4 bits, but range only from 0..7;
- * a PERSISTENT_KEY is "always on" and never reported.
- */
-#define KEY_PERSISTENT		0x00800000
-#define KEY(col, row, keycode)	(((col) << 28) | ((row) << 24) | (keycode))
-#define PERSISTENT_KEY(c, r)	KEY(c, r, KEY_PERSISTENT)
-
 struct twl4030_keypad_data {
 	unsigned rows;
 	unsigned cols;
Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
Quoted 13 lines · Tony Lindgren
Quoted 11 lines · Sanjeev Premi

Fixes the duplicate definitions of KEY and PERSISTENT_KEY leading to these compile-time warnings:

In file included from arch/arm/mach-omap2/board-omap3evm.c:39:
arch/arm/plat-omap/include/mach/keypad.h:38:1: warning: "KEY" redefined
In file included from arch/arm/mach-omap2/board-omap3evm.c:27:
include/linux/i2c/twl4030.h:341:1: warning: this is the location of the previous definition In file included from arch/arm/mach-omap2/board-omap3evm.c:39:
arch/arm/plat-omap/include/mach/keypad.h:39:1: warning: "PERSISTENT_KEY" redefined In file included from arch/arm/mach-omap2/board-omap3evm.c:27:
include/linux/i2c/twl4030.h:342:1: warning: this is the location of the previous definition

Quoted 2 lines

Hmm, I think we should rather remove these from keypad.h. Will queue a patch into omap-fixes for that.

Sorry, you're right, looks like we have still non-standard headers for I2C. Will reset those in linux-omap tree.

Quoted 37 lines

Tony

Quoted 31 lines
---
 include/linux/i2c/twl4030.h |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
include/linux/i2c/twl4030.h +0 -8
index 87accda..21e65bf 100644
@@ -333,14 +333,6 @@ struct twl4030_madc_platform_data {
 	int		irq_line;
 };
 
-/* Boards have uniqe mappings of {col, row} --> keycode.
- * Column and row are 4 bits, but range only from 0..7;
- * a PERSISTENT_KEY is "always on" and never reported.
- */
-#define KEY_PERSISTENT		0x00800000
-#define KEY(col, row, keycode)	(((col) << 28) | ((row) << 24) | (keycode))
-#define PERSISTENT_KEY(c, r)	KEY(c, r, KEY_PERSISTENT)
-
 struct twl4030_keypad_data {
 	unsigned rows;
 	unsigned cols;
Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html