mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
regulator: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
1 parent
6625d9d297
commit
dff91d0b72
38 files changed
+43
-43
No files matched your search
@@ -283,7 +283,7 @@ static int pm800_regulator_dt_init(struct platform_device *pdev)
|
||||
static int pm800_regulator_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent);
|
||||
struct pm80x_platform_data *pdata = pdev->dev.parent->platform_data;
|
||||
struct pm80x_platform_data *pdata = dev_get_platdata(pdev->dev.parent);
|
||||
struct pm800_regulators *pm800_data;
|
||||
struct pm800_regulator_info *info;
|
||||
struct regulator_config config = { };
|
||||
|
||||
@@ -346,7 +346,7 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent);
|
||||
struct pm8607_regulator_info *info = NULL;
|
||||
struct regulator_init_data *pdata = pdev->dev.platform_data;
|
||||
struct regulator_init_data *pdata = dev_get_platdata(&pdev->dev);
|
||||
struct regulator_config config = { };
|
||||
struct resource *res;
|
||||
int i;
|
||||
|
||||
@@ -174,7 +174,7 @@ static int aat2870_regulator_probe(struct platform_device *pdev)
|
||||
|
||||
config.dev = &pdev->dev;
|
||||
config.driver_data = ri;
|
||||
config.init_data = pdev->dev.platform_data;
|
||||
config.init_data = dev_get_platdata(&pdev->dev);
|
||||
|
||||
rdev = regulator_register(&ri->desc, &config);
|
||||
if (IS_ERR(rdev)) {
|
||||
|
||||
@@ -660,7 +660,7 @@ ab3100_regulator_of_probe(struct platform_device *pdev, struct device_node *np)
|
||||
|
||||
static int ab3100_regulators_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct ab3100_platform_data *plfdata = pdev->dev.platform_data;
|
||||
struct ab3100_platform_data *plfdata = dev_get_platdata(&pdev->dev);
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
int err = 0;
|
||||
u8 data;
|
||||
|
||||
@@ -214,7 +214,7 @@ MODULE_DEVICE_TABLE(i2c, ad5398_id);
|
||||
static int ad5398_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct regulator_init_data *init_data = client->dev.platform_data;
|
||||
struct regulator_init_data *init_data = dev_get_platdata(&client->dev);
|
||||
struct regulator_config config = { };
|
||||
struct ad5398_chip_info *chip;
|
||||
const struct ad5398_current_data_format *df =
|
||||
|
||||
@@ -485,7 +485,7 @@ static int da903x_regulator_probe(struct platform_device *pdev)
|
||||
ri->desc.ops = &da9030_regulator_ldo1_15_ops;
|
||||
|
||||
config.dev = &pdev->dev;
|
||||
config.init_data = pdev->dev.platform_data;
|
||||
config.init_data = dev_get_platdata(&pdev->dev);
|
||||
config.driver_data = ri;
|
||||
|
||||
rdev = regulator_register(&ri->desc, &config);
|
||||
|
||||
@@ -349,7 +349,7 @@ static int da9052_regulator_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
da9052 = dev_get_drvdata(pdev->dev.parent);
|
||||
pdata = da9052->dev->platform_data;
|
||||
pdata = dev_get_platdata(da9052->dev);
|
||||
regulator->da9052 = da9052;
|
||||
|
||||
regulator->info = find_regulator_info(regulator->da9052->chip_id,
|
||||
|
||||
@@ -535,7 +535,7 @@ static int da9055_regulator_probe(struct platform_device *pdev)
|
||||
struct regulator_config config = { };
|
||||
struct da9055_regulator *regulator;
|
||||
struct da9055 *da9055 = dev_get_drvdata(pdev->dev.parent);
|
||||
struct da9055_pdata *pdata = da9055->dev->platform_data;
|
||||
struct da9055_pdata *pdata = dev_get_platdata(da9055->dev);
|
||||
int ret, irq;
|
||||
|
||||
if (pdata == NULL || pdata->regulators[pdev->id] == NULL)
|
||||
|
||||
@@ -237,7 +237,7 @@ static int fan53555_regulator_probe(struct i2c_client *client,
|
||||
unsigned int val;
|
||||
int ret;
|
||||
|
||||
pdata = client->dev.platform_data;
|
||||
pdata = dev_get_platdata(&client->dev);
|
||||
if (!pdata || !pdata->regulator) {
|
||||
dev_err(&client->dev, "Platform data not found!\n");
|
||||
return -ENODEV;
|
||||
|
||||
@@ -146,7 +146,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(config))
|
||||
return PTR_ERR(config);
|
||||
} else {
|
||||
config = pdev->dev.platform_data;
|
||||
config = dev_get_platdata(&pdev->dev);
|
||||
}
|
||||
|
||||
if (!config)
|
||||
|
||||
@@ -219,7 +219,7 @@ static struct regulator_ops gpio_regulator_current_ops = {
|
||||
|
||||
static int gpio_regulator_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct gpio_regulator_config *config = pdev->dev.platform_data;
|
||||
struct gpio_regulator_config *config = dev_get_platdata(&pdev->dev);
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct gpio_regulator_data *drvdata;
|
||||
struct regulator_config cfg = { };
|
||||
|
||||
@@ -110,7 +110,7 @@ static int isl6271a_probe(struct i2c_client *i2c,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct regulator_config config = { };
|
||||
struct regulator_init_data *init_data = i2c->dev.platform_data;
|
||||
struct regulator_init_data *init_data = dev_get_platdata(&i2c->dev);
|
||||
struct isl_pmic *pmic;
|
||||
int err, i;
|
||||
|
||||
|
||||
@@ -425,7 +425,7 @@ static int lp3971_i2c_probe(struct i2c_client *i2c,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct lp3971 *lp3971;
|
||||
struct lp3971_platform_data *pdata = i2c->dev.platform_data;
|
||||
struct lp3971_platform_data *pdata = dev_get_platdata(&i2c->dev);
|
||||
int ret;
|
||||
u16 val;
|
||||
|
||||
|
||||
@@ -519,7 +519,7 @@ static int lp3972_i2c_probe(struct i2c_client *i2c,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct lp3972 *lp3972;
|
||||
struct lp3972_platform_data *pdata = i2c->dev.platform_data;
|
||||
struct lp3972_platform_data *pdata = dev_get_platdata(&i2c->dev);
|
||||
int ret;
|
||||
u16 val;
|
||||
|
||||
|
||||
@@ -961,7 +961,7 @@ static int lp872x_probe(struct i2c_client *cl, const struct i2c_device_id *id)
|
||||
}
|
||||
|
||||
lp->dev = &cl->dev;
|
||||
lp->pdata = cl->dev.platform_data;
|
||||
lp->pdata = dev_get_platdata(&cl->dev);
|
||||
lp->chipid = id->driver_data;
|
||||
lp->num_regulators = num_regulators;
|
||||
i2c_set_clientdata(cl, lp);
|
||||
|
||||
@@ -449,7 +449,7 @@ static int lp8755_probe(struct i2c_client *client,
|
||||
{
|
||||
int ret, icnt;
|
||||
struct lp8755_chip *pchip;
|
||||
struct lp8755_platform_data *pdata = client->dev.platform_data;
|
||||
struct lp8755_platform_data *pdata = dev_get_platdata(&client->dev);
|
||||
|
||||
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
|
||||
dev_err(&client->dev, "i2c functionality check fail.\n");
|
||||
|
||||
@@ -163,7 +163,7 @@ static int max1586_pmic_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *i2c_id)
|
||||
{
|
||||
struct regulator_dev **rdev;
|
||||
struct max1586_platform_data *pdata = client->dev.platform_data;
|
||||
struct max1586_platform_data *pdata = dev_get_platdata(&client->dev);
|
||||
struct regulator_config config = { };
|
||||
struct max1586_data *max1586;
|
||||
int i, id, ret = -ENOMEM;
|
||||
|
||||
@@ -152,7 +152,7 @@ static struct regmap_config max8649_regmap_config = {
|
||||
static int max8649_regulator_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct max8649_platform_data *pdata = client->dev.platform_data;
|
||||
struct max8649_platform_data *pdata = dev_get_platdata(&client->dev);
|
||||
struct max8649_regulator_info *info = NULL;
|
||||
struct regulator_config config = { };
|
||||
unsigned int val;
|
||||
|
||||
@@ -309,7 +309,7 @@ static int max8660_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *i2c_id)
|
||||
{
|
||||
struct regulator_dev **rdev;
|
||||
struct max8660_platform_data *pdata = client->dev.platform_data;
|
||||
struct max8660_platform_data *pdata = dev_get_platdata(&client->dev);
|
||||
struct regulator_config config = { };
|
||||
struct max8660 *max8660;
|
||||
int boot_on, i, id, ret = -EINVAL;
|
||||
|
||||
@@ -277,7 +277,7 @@ static int max8925_regulator_dt_init(struct platform_device *pdev,
|
||||
static int max8925_regulator_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent);
|
||||
struct regulator_init_data *pdata = pdev->dev.platform_data;
|
||||
struct regulator_init_data *pdata = dev_get_platdata(&pdev->dev);
|
||||
struct regulator_config config = { };
|
||||
struct max8925_regulator_info *ri;
|
||||
struct resource *res;
|
||||
|
||||
Loaded 20 of 38 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user