Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11f1f2af authored by Anton Vorontsov's avatar Anton Vorontsov Committed by Jean Delvare
Browse files

i2c: Add info->archdata field



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

Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 02cf6172
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -266,6 +266,9 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)

	client->dev.platform_data = info->platform_data;

	if (info->archdata)
		client->dev.archdata = *info->archdata;

	client->flags = info->flags;
	client->addr = info->addr;
	client->irq = info->irq;
+2 −0
Original line number Diff line number Diff line
@@ -239,6 +239,7 @@ static inline void i2c_set_clientdata(struct i2c_client *dev, void *data)
 * @flags: to initialize i2c_client.flags
 * @addr: stored in i2c_client.addr
 * @platform_data: stored in i2c_client.dev.platform_data
 * @archdata: copied into i2c_client.dev.archdata
 * @irq: stored in i2c_client.irq
 *
 * I2C doesn't actually support hardware probing, although controllers and
@@ -258,6 +259,7 @@ struct i2c_board_info {
	unsigned short	flags;
	unsigned short	addr;
	void		*platform_data;
	struct dev_archdata	*archdata;
	int		irq;
};