[PATCH 3/7] i2c: add platform_data for i2c_board_info
Marc Reilly
marc at cpdesign.com.au
Sun Jul 29 03:41:50 EDT 2012
Signed-off-by: Marc Reilly <marc at cpdesign.com.au>
---
drivers/i2c/i2c.c | 1 +
include/i2c/i2c.h | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c
index 5df0d30..15f5507 100644
--- a/drivers/i2c/i2c.c
+++ b/drivers/i2c/i2c.c
@@ -250,6 +250,7 @@ struct i2c_client *i2c_new_device(struct i2c_adapter *adapter,
client = xzalloc(sizeof *client);
strcpy(client->dev.name, chip->type);
client->dev.type_data = client;
+ client->dev.platform_data = chip->platform_data;
client->adapter = adapter;
client->addr = chip->addr;
diff --git a/include/i2c/i2c.h b/include/i2c/i2c.h
index ccbf518..c3e1763 100644
--- a/include/i2c/i2c.h
+++ b/include/i2c/i2c.h
@@ -99,6 +99,7 @@ struct i2c_client {
struct i2c_board_info {
char type[I2C_NAME_SIZE]; /**< name of device */
unsigned short addr; /**< stored in i2c_client.addr */
+ void *platform_data; /**< platform data for device */
};
/**
--
1.7.7
More information about the barebox
mailing list