regulator: Convert i2c drivers to use .probe_new
authorAxel Lin <axel.lin@ingics.com>
Thu, 9 Jan 2020 15:58:08 +0000 (23:58 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 13 Jan 2020 15:03:06 +0000 (15:03 +0000)
Use the new .probe_new for i2c drivers.
These drivers do not use const struct i2c_device_id * argument, so convert
them to utilise the simplified i2c driver registration.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20200109155808.22003-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 files changed:
drivers/regulator/da9210-regulator.c
drivers/regulator/da9211-regulator.c
drivers/regulator/isl9305.c
drivers/regulator/lp3971.c
drivers/regulator/ltc3676.c
drivers/regulator/mt6311-regulator.c
drivers/regulator/pv88060-regulator.c
drivers/regulator/pv88090-regulator.c
drivers/regulator/slg51000-regulator.c
drivers/regulator/sy8106a-regulator.c
drivers/regulator/sy8824x.c
drivers/regulator/tps65132-regulator.c

index f9448ed..0cdeb61 100644 (file)
@@ -131,8 +131,7 @@ static const struct of_device_id da9210_dt_ids[] = {
 };
 MODULE_DEVICE_TABLE(of, da9210_dt_ids);
 
-static int da9210_i2c_probe(struct i2c_client *i2c,
-                           const struct i2c_device_id *id)
+static int da9210_i2c_probe(struct i2c_client *i2c)
 {
        struct da9210 *chip;
        struct device *dev = &i2c->dev;
@@ -228,7 +227,7 @@ static struct i2c_driver da9210_regulator_driver = {
                .name = "da9210",
                .of_match_table = of_match_ptr(da9210_dt_ids),
        },
-       .probe = da9210_i2c_probe,
+       .probe_new = da9210_i2c_probe,
        .id_table = da9210_i2c_id,
 };
 
index 523dc1b..2ea4362 100644 (file)
@@ -416,8 +416,7 @@ static int da9211_regulator_init(struct da9211 *chip)
 /*
  * I2C driver interface functions
  */
-static int da9211_i2c_probe(struct i2c_client *i2c,
-               const struct i2c_device_id *id)
+static int da9211_i2c_probe(struct i2c_client *i2c)
 {
        struct da9211 *chip;
        int error, ret;
@@ -526,7 +525,7 @@ static struct i2c_driver da9211_regulator_driver = {
                .name = "da9211",
                .of_match_table = of_match_ptr(da9211_dt_ids),
        },
-       .probe = da9211_i2c_probe,
+       .probe_new = da9211_i2c_probe,
        .id_table = da9211_i2c_id,
 };
 
index 978f5e9..cfb7659 100644 (file)
@@ -137,8 +137,7 @@ static const struct regmap_config isl9305_regmap = {
        .cache_type = REGCACHE_RBTREE,
 };
 
-static int isl9305_i2c_probe(struct i2c_client *i2c,
-                            const struct i2c_device_id *id)
+static int isl9305_i2c_probe(struct i2c_client *i2c)
 {
        struct regulator_config config = { };
        struct isl9305_pdata *pdata = i2c->dev.platform_data;
@@ -198,7 +197,7 @@ static struct i2c_driver isl9305_regulator_driver = {
                .name = "isl9305",
                .of_match_table = of_match_ptr(isl9305_dt_ids),
        },
-       .probe = isl9305_i2c_probe,
+       .probe_new = isl9305_i2c_probe,
        .id_table = isl9305_i2c_id,
 };
 
index bc96e65..8be252f 100644 (file)
@@ -400,8 +400,7 @@ static int setup_regulators(struct lp3971 *lp3971,
        return 0;
 }
 
-static int lp3971_i2c_probe(struct i2c_client *i2c,
-                           const struct i2c_device_id *id)
+static int lp3971_i2c_probe(struct i2c_client *i2c)
 {
        struct lp3971 *lp3971;
        struct lp3971_platform_data *pdata = dev_get_platdata(&i2c->dev);
@@ -449,7 +448,7 @@ static struct i2c_driver lp3971_i2c_driver = {
        .driver = {
                .name = "LP3971",
        },
-       .probe    = lp3971_i2c_probe,
+       .probe_new = lp3971_i2c_probe,
        .id_table = lp3971_i2c_id,
 };
 
index d934540..e12e52c 100644 (file)
@@ -301,8 +301,7 @@ static irqreturn_t ltc3676_isr(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-static int ltc3676_regulator_probe(struct i2c_client *client,
-                                   const struct i2c_device_id *id)
+static int ltc3676_regulator_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct regulator_init_data *init_data = dev_get_platdata(dev);
@@ -380,7 +379,7 @@ static struct i2c_driver ltc3676_driver = {
                .name = DRIVER_NAME,
                .of_match_table = of_match_ptr(ltc3676_of_match),
        },
-       .probe = ltc3676_regulator_probe,
+       .probe_new = ltc3676_regulator_probe,
        .id_table = ltc3676_i2c_id,
 };
 module_i2c_driver(ltc3676_driver);
index af95449..69e6af3 100644 (file)
@@ -85,8 +85,7 @@ static const struct regulator_desc mt6311_regulators[] = {
 /*
  * I2C driver interface functions
  */
-static int mt6311_i2c_probe(struct i2c_client *i2c,
-               const struct i2c_device_id *id)
+static int mt6311_i2c_probe(struct i2c_client *i2c)
 {
        struct regulator_config config = { };
        struct regulator_dev *rdev;
@@ -154,7 +153,7 @@ static struct i2c_driver mt6311_regulator_driver = {
                .name = "mt6311",
                .of_match_table = of_match_ptr(mt6311_dt_ids),
        },
-       .probe = mt6311_i2c_probe,
+       .probe_new = mt6311_i2c_probe,
        .id_table = mt6311_i2c_id,
 };
 
index 3d34158..787ced9 100644 (file)
@@ -279,8 +279,7 @@ error_i2c:
 /*
  * I2C driver interface functions
  */
-static int pv88060_i2c_probe(struct i2c_client *i2c,
-               const struct i2c_device_id *id)
+static int pv88060_i2c_probe(struct i2c_client *i2c)
 {
        struct regulator_init_data *init_data = dev_get_platdata(&i2c->dev);
        struct pv88060 *chip;
@@ -385,7 +384,7 @@ static struct i2c_driver pv88060_regulator_driver = {
                .name = "pv88060",
                .of_match_table = of_match_ptr(pv88060_dt_ids),
        },
-       .probe = pv88060_i2c_probe,
+       .probe_new = pv88060_i2c_probe,
        .id_table = pv88060_i2c_id,
 };
 
index b1d0d97..784729e 100644 (file)
@@ -272,8 +272,7 @@ error_i2c:
 /*
  * I2C driver interface functions
  */
-static int pv88090_i2c_probe(struct i2c_client *i2c,
-               const struct i2c_device_id *id)
+static int pv88090_i2c_probe(struct i2c_client *i2c)
 {
        struct regulator_init_data *init_data = dev_get_platdata(&i2c->dev);
        struct pv88090 *chip;
@@ -406,7 +405,7 @@ static struct i2c_driver pv88090_regulator_driver = {
                .name = "pv88090",
                .of_match_table = of_match_ptr(pv88090_dt_ids),
        },
-       .probe = pv88090_i2c_probe,
+       .probe_new = pv88090_i2c_probe,
        .id_table = pv88090_i2c_id,
 };
 
index bf1a350..44e4cec 100644 (file)
@@ -439,8 +439,7 @@ static void slg51000_clear_fault_log(struct slg51000 *chip)
                dev_dbg(chip->dev, "Fault log: FLT_POR\n");
 }
 
-static int slg51000_i2c_probe(struct i2c_client *client,
-                             const struct i2c_device_id *id)
+static int slg51000_i2c_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct slg51000 *chip;
@@ -509,7 +508,7 @@ static struct i2c_driver slg51000_regulator_driver = {
        .driver = {
                .name = "slg51000-regulator",
        },
-       .probe = slg51000_i2c_probe,
+       .probe_new = slg51000_i2c_probe,
        .id_table = slg51000_i2c_id,
 };
 
index 42e03b2..2222e73 100644 (file)
@@ -61,8 +61,7 @@ static const struct regulator_desc sy8106a_reg = {
 /*
  * I2C driver interface functions
  */
-static int sy8106a_i2c_probe(struct i2c_client *i2c,
-                           const struct i2c_device_id *id)
+static int sy8106a_i2c_probe(struct i2c_client *i2c)
 {
        struct device *dev = &i2c->dev;
        struct regulator_dev *rdev;
@@ -141,7 +140,7 @@ static struct i2c_driver sy8106a_regulator_driver = {
                .name = "sy8106a",
                .of_match_table = of_match_ptr(sy8106a_i2c_of_match),
        },
-       .probe = sy8106a_i2c_probe,
+       .probe_new = sy8106a_i2c_probe,
        .id_table = sy8106a_i2c_id,
 };
 
index 92adb4f..62d243f 100644 (file)
@@ -112,8 +112,7 @@ static const struct regmap_config sy8824_regmap_config = {
        .val_bits = 8,
 };
 
-static int sy8824_i2c_probe(struct i2c_client *client,
-                           const struct i2c_device_id *id)
+static int sy8824_i2c_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device_node *np = dev->of_node;
@@ -222,7 +221,7 @@ static struct i2c_driver sy8824_regulator_driver = {
                .name = "sy8824-regulator",
                .of_match_table = of_match_ptr(sy8824_dt_ids),
        },
-       .probe = sy8824_i2c_probe,
+       .probe_new = sy8824_i2c_probe,
        .id_table = sy8824_id,
 };
 module_i2c_driver(sy8824_regulator_driver);
index 7b0e38f..0edc830 100644 (file)
@@ -220,8 +220,7 @@ static const struct regmap_config tps65132_regmap_config = {
        .wr_table       = &tps65132_no_reg_table,
 };
 
-static int tps65132_probe(struct i2c_client *client,
-                         const struct i2c_device_id *client_id)
+static int tps65132_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct tps65132_regulator *tps;
@@ -272,7 +271,7 @@ static struct i2c_driver tps65132_i2c_driver = {
        .driver = {
                .name = "tps65132",
        },
-       .probe = tps65132_probe,
+       .probe_new = tps65132_probe,
        .id_table = tps65132_id,
 };