Skip to content

Commit

Permalink
gpio: adp5588-gpio: add i2c forward declaration
Browse files Browse the repository at this point in the history
Some ADP5588 functions take a pointer to an i2c_client, but if the i2c
header doesn't happen to be included first, we hit the standard "struct
declared inside parameter list" warnings from gcc.  So add a simple
forward decl of the i2c_client struct.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Michael Hennerich authored and Linus Torvalds committed Oct 28, 2010
1 parent 9ef8c8c commit dc5ae4f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/linux/i2c/adp5588.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ struct adp5588_kpad_platform_data {
const struct adp5588_gpio_platform_data *gpio_data;
};

struct i2c_client; /* forward declaration */

struct adp5588_gpio_platform_data {
int gpio_start; /* GPIO Chip base # */
unsigned irq_base; /* interrupt base # */
Expand Down

0 comments on commit dc5ae4f

Please sign in to comment.