Commit 11f1f2afd6b07729b12aaba479344d7f12d88ff9

Authored by Anton Vorontsov
Committed by Jean Delvare
1 parent 02cf617282

i2c: Add info->archdata field

If present the info->archdata is copied into the dev->archdata.
Some (OpenFirmware) platforms need it.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>

Showing 2 changed files with 5 additions and 0 deletions Side-by-side Diff

drivers/i2c/i2c-core.c
... ... @@ -266,6 +266,9 @@
266 266  
267 267 client->dev.platform_data = info->platform_data;
268 268  
  269 + if (info->archdata)
  270 + client->dev.archdata = *info->archdata;
  271 +
269 272 client->flags = info->flags;
270 273 client->addr = info->addr;
271 274 client->irq = info->irq;
... ... @@ -239,6 +239,7 @@
239 239 * @flags: to initialize i2c_client.flags
240 240 * @addr: stored in i2c_client.addr
241 241 * @platform_data: stored in i2c_client.dev.platform_data
  242 + * @archdata: copied into i2c_client.dev.archdata
242 243 * @irq: stored in i2c_client.irq
243 244 *
244 245 * I2C doesn't actually support hardware probing, although controllers and
... ... @@ -258,6 +259,7 @@
258 259 unsigned short flags;
259 260 unsigned short addr;
260 261 void *platform_data;
  262 + struct dev_archdata *archdata;
261 263 int irq;
262 264 };
263 265