lkml.org 
[lkml]   [2009]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] i2c: Fix warnings from I2C_BOARD_INFO()
Date
The first argument for this macro is a string, and
thus having (arg) in the macro is causing gcc 4.2.4
to produce warnings about strings of the form ("str").

Remove the brackets from the first argument.

example warning:

mach-bast.c:545:3: warning: array initialized from parenthesized string constant

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
include/linux/i2c.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 00ee11e..ad25805 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -274,7 +274,7 @@ struct i2c_board_info {
* are provided using conventional syntax.
*/
#define I2C_BOARD_INFO(dev_type, dev_addr) \
- .type = (dev_type), .addr = (dev_addr)
+ .type = dev_type, .addr = (dev_addr)


/* Add-on boards should register/unregister their devices; e.g. a board
--
1.5.6.5


\
 
 \ /
  Last update: 2009-04-14 15:53    [from the cache]
©2003-2011 Jasper Spaans