]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: Fix sparse warnings for I2C_BOARD_INFO()
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 13 Apr 2009 15:02:14 +0000 (17:02 +0200)
committerJean Delvare <khali@linux-fr.org>
Mon, 13 Apr 2009 15:02:14 +0000 (17:02 +0200)
commit8014263dba9023f235fdd7f238c6f4f55114dec2
tree12ebe93ed86da0f906ed49e10198ee3db6158c8c
parenta86699fbfe6033dd78ab0243238ae01d87c6bc65
i2c: Fix sparse warnings for I2C_BOARD_INFO()

Since the first argument to I2C_BOARD_INFO() must be a string constant,
there is no need to parenthesise it, and adding parentheses results in
an invalid initialiser for char[].  gcc obviously accepts this syntax as
an extension, but sparse complains, e.g.:

drivers/net/sfc/boards.c:173:2: warning: array initialized from parenthesized string constant

Therefore, remove the parentheses.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
include/linux/i2c.h