mfd: remove redundant dev_set_drvdata() from i2c drivers
Subsystems (2)
PATCH v2 1/1 mfd: remove redundant dev_set_drvdata() from i2c drivers
the i2c_set_clientdata() is the inline function which is complemented by the dev_set_drvdata() internally. Do not need to use i2c_set_clientdata() and dev_set_drvdata() at the same time.
Signed-off-by Guiting Shen <[email protected]>
Reviewed-by Johan Hovold <[email protected]>
--- drivers/mfd/88pm80x.c | 1 - drivers/mfd/88pm860x-core.c | 1 - drivers/mfd/aat2870-core.c | 2 -- drivers/mfd/lm3533-core.c | 2 -- drivers/mfd/max8907.c | 2 -- drivers/mfd/max8925-i2c.c | 1 - drivers/mfd/wm8400-core.c | 2 -- drivers/mfd/wm8994-core.c | 2 -- 8 files changed, 13 deletions(-)
drivers/mfd/88pm80x.c +0 -1
@@ -74,7 +74,6 @@ int pm80x_init(struct i2c_client *client) chip->irq = client->irq; chip->dev = &client->dev; -dev_set_drvdata (chip->dev, chip);i2c_set_clientdata (chip->client, chip); ret =regmap_read (chip->regmap,PM80X_CHIP_ID , &val);
drivers/mfd/88pm860x-core.c +0 -1
@@ -1166,7 +1166,6 @@ static int pm860x_probe(struct i2c_client *client) chip->client = client;i2c_set_clientdata (client, chip); chip->dev = &client->dev; -dev_set_drvdata (chip->dev, chip);/* * Both client and companion client shares same platform driver.
drivers/mfd/aat2870-core.c +0 -2
@@ -345,8 +345,6 @@ static int aat2870_i2c_probe(struct i2c_client *client)return -ENOMEM ; aat2870->dev = &client->dev; -dev_set_drvdata (aat2870->dev, aat2870); - aat2870->client = client;i2c_set_clientdata (client, aat2870);
drivers/mfd/lm3533-core.c +0 -2
@@ -485,8 +485,6 @@ static int lm3533_device_init(struct lm3533 *lm3533) lm3533->gpio_hwen = pdata->gpio_hwen; -dev_set_drvdata (lm3533->dev, lm3533); -if (gpio_is_valid (lm3533->gpio_hwen)) { ret =devm_gpio_request_one (lm3533->dev, lm3533->gpio_hwen,GPIOF_OUT_INIT_LOW ,"lm3533-hwen" );
drivers/mfd/max8907.c +0 -2
@@ -201,8 +201,6 @@ static int max8907_i2c_probe(struct i2c_client *i2c) } max8907->dev = &i2c->dev; -dev_set_drvdata (max8907->dev, max8907); - max8907->i2c_gen = i2c;i2c_set_clientdata (i2c, max8907); max8907->regmap_gen = devm_regmap_init_i2c(i2c,
drivers/mfd/max8925-i2c.c +0 -1
@@ -172,7 +172,6 @@ static int max8925_probe(struct i2c_client *client) chip->i2c = client; chip->dev = &client->dev;i2c_set_clientdata (client, chip); -dev_set_drvdata (chip->dev, chip);mutex_init (&chip->io_lock); chip->rtc =i2c_new_dummy_device (chip->i2c->adapter,RTC_I2C_ADDR );
drivers/mfd/wm8400-core.c +0 -2
@@ -54,8 +54,6 @@ static int wm8400_init(struct wm8400 *wm8400,unsigned int reg;int ret; -dev_set_drvdata (wm8400->dev, wm8400); -/* Check that this is actually a WM8400 */ ret =regmap_read (wm8400->regmap,WM8400_RESET_ID , ®);if (ret !=0 ) {
drivers/mfd/wm8994-core.c +0 -2
@@ -320,8 +320,6 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)if (ret !=0 )return ret; -dev_set_drvdata (wm8994->dev, wm8994); -/* Add the on-chip regulators first for bootstrapping */ ret = mfd_add_devices(wm8994->dev, 0, wm8994_regulator_devs,
Signature · 1 line
2.34.1