mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
regulator: Convert i2c drivers to use .probe_new
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>
This commit is contained in:
parent
7eec678698
commit
77e29598ca
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user