Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dff91d0b authored by Jingoo Han's avatar Jingoo Han Committed by Mark Brown
Browse files

regulator: use dev_get_platdata()



Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 6625d9d2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 = { };
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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)) {
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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 =
Loading