i2c: Get rid of i2c_board_info->archdata
authorBoris Brezillon <boris.brezillon@bootlin.com>
Sun, 25 Mar 2018 12:49:01 +0000 (14:49 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 15 May 2018 08:42:20 +0000 (10:42 +0200)
The only user of i2c_board_info->archdata is the OF parsing code and it
just pass a zero-initialized object which has the same effect as leaving
->archdata to NULL since the client object is allocated with kzalloc().

Get rid of this useless field.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/i2c-core-base.c
drivers/i2c/i2c-core-of.c
include/linux/i2c.h

index 1ba40bb2b966a943eb2544c8b5710f1964b22aba..a407022fdc7632c0da88f09ddfdec41ee7021941 100644 (file)
@@ -717,10 +717,6 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
        client->adapter = adap;
 
        client->dev.platform_data = info->platform_data;
-
-       if (info->archdata)
-               client->dev.archdata = *info->archdata;
-
        client->flags = info->flags;
        client->addr = info->addr;
 
index c405270a98b4f01c89944e91f9dc4bba3b4620c4..15bd51eca37bed5562f322beb2590b1ab9160816 100644 (file)
@@ -27,7 +27,6 @@ static struct i2c_client *of_i2c_register_device(struct i2c_adapter *adap,
 {
        struct i2c_client *client;
        struct i2c_board_info info = {};
-       struct dev_archdata dev_ad = {};
        u32 addr;
        int ret;
 
@@ -56,7 +55,6 @@ static struct i2c_client *of_i2c_register_device(struct i2c_adapter *adap,
        }
 
        info.addr = addr;
-       info.archdata = &dev_ad;
        info.of_node = of_node_get(node);
 
        if (of_property_read_bool(node, "host-notify"))
index 44ad14e016b556f66e4c92adddecd45199794519..aeb655772ef89b437effe9d8b4fb27edd7f407f1 100644 (file)
@@ -394,7 +394,6 @@ static inline bool i2c_detect_slave_mode(struct device *dev) { return false; }
  * @addr: stored in i2c_client.addr
  * @dev_name: Overrides the default <busnr>-<addr> dev_name if set
  * @platform_data: stored in i2c_client.dev.platform_data
- * @archdata: copied into i2c_client.dev.archdata
  * @of_node: pointer to OpenFirmware device node
  * @fwnode: device node supplied by the platform firmware
  * @properties: additional device properties for the device
@@ -419,7 +418,6 @@ struct i2c_board_info {
        unsigned short  addr;
        const char      *dev_name;
        void            *platform_data;
-       struct dev_archdata     *archdata;
        struct device_node *of_node;
        struct fwnode_handle *fwnode;
        const struct property_entry *properties;