i2c: mux: pca954x: simplify code to reach the adapter
Subsystems (4)
PATCH v2 1/3 i2c: mux: pca954x: simplify code to reach the adapter
From: Luca Ceresoli <[email protected]>
struct i2c_client has a direct pointer to the adapter, no need to dig it out of the struct device tree.
--- drivers/i2c/muxes/i2c-mux-pca954x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/muxes/i2c-mux-pca954x.c +1 -1
@@ -347,7 +347,7 @@ static void pca954x_cleanup(struct i2c_mux_core *muxc)static int pca954x_probe (struct i2c_client *client,const struct i2c_device_id *id) { -struct i2c_adapter *adap =to_i2c_adapter (client->dev.parent); +struct i2c_adapter *adap = client->adapter;struct pca954x_platform_data *pdata =dev_get_platdata (&client->dev);struct device *dev = &client->dev;struct device_node *np = dev->of_node;
Signature · 1 line
2.17.1
PATCH v2 2/3 i2c: mux: ltc4306: simplify code to reach the adapter
From: Luca Ceresoli <[email protected]>
struct i2c_client has a direct pointer to the adapter, no need to dig it out of the struct device tree.
--- drivers/i2c/muxes/i2c-mux-ltc4306.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/muxes/i2c-mux-ltc4306.c +1 -1
@@ -208,7 +208,7 @@ MODULE_DEVICE_TABLE(of, ltc4306_of_match);static int ltc4306_probe (struct i2c_client *client) { -struct i2c_adapter *adap =to_i2c_adapter (client->dev.parent); +struct i2c_adapter *adap = client->adapter;const struct chip_desc *chip;struct i2c_mux_core *muxc;struct ltc4306 *data;
Signature · 1 line
2.17.1
Re: [PATCH v2 2/3] i2c: mux: ltc4306: simplify code to reach the adapter
Quoted 7 lines · Luca Ceresoli
From: Luca Ceresoli <[email protected]>
struct
i2c_clienthas a direct pointer to the adapter, no need to dig it out of the struct device tree.Suggested-by Peter Rosin <[email protected]>Signed-off-by Luca Ceresoli <[email protected]>
PATCH v2 3/3 i2c: mux: mlxcpld: simplify code to reach the adapter
In reply to Luca CeresoliFrom: Luca Ceresoli <[email protected]>
struct i2c_client has a direct pointer to the adapter, no need to dig it out of the struct device tree.
--- drivers/i2c/muxes/i2c-mux-mlxcpld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/muxes/i2c-mux-mlxcpld.c +1 -1
@@ -132,7 +132,7 @@ static int mlxcpld_mux_deselect(struct i2c_mux_core *muxc, u32 chan)static int mlxcpld_mux_probe (struct i2c_client *client,const struct i2c_device_id *id) { -struct i2c_adapter *adap =to_i2c_adapter (client->dev.parent); +struct i2c_adapter *adap = client->adapter;struct mlxcpld_mux_plat_data *pdata =dev_get_platdata (&client->dev);struct i2c_mux_core *muxc;int num, force;
Signature · 1 line
2.17.1
Re: [PATCH v2 3/3] i2c: mux: mlxcpld: simplify code to reach the adapter
Quoted 7 lines · Luca Ceresoli
From: Luca Ceresoli <[email protected]>
struct
i2c_clienthas a direct pointer to the adapter, no need to dig it out of the struct device tree.Suggested-by Peter Rosin <[email protected]>Signed-off-by Luca Ceresoli <[email protected]>
Quoted 6 lines · Luca Ceresoli
From: Luca Ceresoli <[email protected]>
struct
i2c_clienthas a direct pointer to the adapter, no need to dig it out of the struct device tree.Signed-off-by Luca Ceresoli <[email protected]>
I like such cleanups!
Quoted 9 lines · Wolfram Sang
Quoted 6 lines · Luca Ceresoli
From: Luca Ceresoli <[email protected]>
struct
i2c_clienthas a direct pointer to the adapter, no need to dig it out of the struct device tree.Signed-off-by Luca Ceresoli <[email protected]>I like such cleanups!
Me too!
All three patches applied to for-next. Thanks!
Cheers,
Peter