lkml.org 
[lkml]   [2010]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] gpio: adp5588-gpio: add i2c forward declaration
Date
From: Michael Hennerich <michael.hennerich@analog.com>

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>
---
include/linux/i2c/adp5588.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/i2c/adp5588.h b/include/linux/i2c/adp5588.h
index 269181b..089d4d9 100644
--- a/include/linux/i2c/adp5588.h
+++ b/include/linux/i2c/adp5588.h
@@ -126,6 +126,8 @@ struct adp5588_kpad_platform_data {
const struct adp5588_gpio_platform_data *gpio_data;
};

+struct i2c_client; /* forward declaration */
+
struct adp5588_gpio_platform_data {
unsigned gpio_start; /* GPIO Chip base # */
unsigned pullup_dis_mask; /* Pull-Up Disable Mask */
--
1.7.3.1


\
 
 \ /
  Last update: 2010-10-17 00:35    [W:0.023 / U:2.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site