]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
regulator: use dev_get_platdata()
authorJingoo Han <jg1.han@samsung.com>
Tue, 30 Jul 2013 08:20:47 +0000 (17:20 +0900)
committerMark Brown <broonie@linaro.org>
Tue, 30 Jul 2013 11:24:20 +0000 (12:24 +0100)
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>
38 files changed:
drivers/regulator/88pm800.c
drivers/regulator/88pm8607.c
drivers/regulator/aat2870-regulator.c
drivers/regulator/ab3100.c
drivers/regulator/ad5398.c
drivers/regulator/da903x.c
drivers/regulator/da9052-regulator.c
drivers/regulator/da9055-regulator.c
drivers/regulator/fan53555.c
drivers/regulator/fixed.c
drivers/regulator/gpio-regulator.c
drivers/regulator/isl6271a-regulator.c
drivers/regulator/lp3971.c
drivers/regulator/lp3972.c
drivers/regulator/lp872x.c
drivers/regulator/lp8755.c
drivers/regulator/max1586.c
drivers/regulator/max8649.c
drivers/regulator/max8660.c
drivers/regulator/max8925-regulator.c
drivers/regulator/max8952.c
drivers/regulator/max8973-regulator.c
drivers/regulator/palmas-regulator.c
drivers/regulator/pcap-regulator.c
drivers/regulator/pcf50633-regulator.c
drivers/regulator/tps51632-regulator.c
drivers/regulator/tps62360-regulator.c
drivers/regulator/tps65023-regulator.c
drivers/regulator/tps6524x-regulator.c
drivers/regulator/twl-regulator.c
drivers/regulator/userspace-consumer.c
drivers/regulator/virtual.c
drivers/regulator/wm831x-dcdc.c
drivers/regulator/wm831x-isink.c
drivers/regulator/wm831x-ldo.c
drivers/regulator/wm8350-regulator.c
drivers/regulator/wm8400-regulator.c
drivers/regulator/wm8994-regulator.c

index b4c29b1c52a5843d09180637fdfc5274508288bf..c72fe95e443f7164061ba3d7f5624825b871ea91 100644 (file)
@@ -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 = { };
index 8a7cb1f43046acf8c17572088d250c5396a9b070..70230974468cb97ae9c76fe9fdb69ebc04e13560 100644 (file)
@@ -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;
index 8b5876356db97da46cd5ac0dd59dccb4b2521361..881159dfcb5e70fc3532d7a9ccc20cad99354459 100644 (file)
@@ -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)) {
index 3be9e46594a134286b59010c3fa83511fa9c510e..7d5eaa874b2da9337e387b1271bd2e38a3d25d2e 100644 (file)
@@ -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;
index 6b981b5faa7015c53f10a463d7a53097edeab075..b2b203cb6b2f9373a0d09f5773f3d912922614dd 100644 (file)
@@ -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 =
index 2afa5730f324ba1ef1bb068b5f63c79e41c11a8f..d9799793308cea3ef6b0259929cf919f26b84c42 100644 (file)
@@ -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);
index 96b569abb46cfe055a50cdf35a4c362a15ba0a3a..1e4d483f616373a6fb19b339ce6325be7c8a3b33 100644 (file)
@@ -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,
index 30221099d09c4d09bc3f406c94e5fa089dadc5b8..77b53e5a231cabda9eaa915efa718ad9ce5e18f5 100644 (file)
@@ -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)
index f0e1ae52bb05dd5369769d1b8d09f9c206008495..a32b44272a05dcc114ca8b160f1bf95a42589881 100644 (file)
@@ -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;
index e5c03b534faefce8d2e8f30a5ebecd48b1a995dc..7610920014d789925368fd4316d35c1104fbf9ac 100644 (file)
@@ -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)
index 9d39eb4aafa3634762678dcf65d460d66b9de8a7..98a98ffa7fe07d2bcb23f2c9cad593b416aaf203 100644 (file)
@@ -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 = { };
index b99c49b9aff0a0577009b57fe509f18269d0e9a4..88c1a3acf563ebad5aa6301636961eda75528365 100644 (file)
@@ -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;
 
index 3809b43816060ca0a4e71fecc024b6c7e472b09d..5a4604ee5ea593d33fa0e3412b36ff9baf6bae40 100644 (file)
@@ -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;
 
index 573024039ca0c5751fbd5faf31ca2553d0ee91c1..093e6f44ff8a3e0d9f17eb6cd0001c36d5911b37 100644 (file)
@@ -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;
 
index b16336bcd4d46daa099c313fc8cb98b6488ea230..2b67c80fab6a3f48259764c74703a92bb3e6725e 100644 (file)
@@ -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);
index d9e38b4c2adcd45b39bceba1b7b7b80dff09234d..7507db44bf2677e85fc79827d0df81cc195875ae 100644 (file)
@@ -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");
index 54af6101581495c41c686d5c56a6630c6e5a375e..3a599ee0a456000b5058771e5a8325d76afca521 100644 (file)
@@ -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;
index db6c9be10f3f3470de157a0c0e0592645d5b3a83..19c6f08eafd5bddfe5a626696bafcea8bf5f36ec 100644 (file)
@@ -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;
index d428ef9a626fefde45c5e8487f3ec3125abe05c8..bfd41084c7dfd8a96ea23e9587434cca78cb9f52 100644 (file)
@@ -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;
index e6d54a546d36d40c68aeb0b623c8d83fee79ef0f..d80b5fa758ae5012585acb0a2e2b2947005177ce 100644 (file)
@@ -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;
index 5259c2fea90a78fa85431630e14d5bb149d52a3c..788e5ae2af1b51464b16dca99c4d190a067cc67a 100644 (file)
@@ -196,7 +196,7 @@ static int max8952_pmic_probe(struct i2c_client *client,
                const struct i2c_device_id *i2c_id)
 {
        struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
-       struct max8952_platform_data *pdata = client->dev.platform_data;
+       struct max8952_platform_data *pdata = dev_get_platdata(&client->dev);
        struct regulator_config config = { };
        struct max8952_data *max8952;
 
index 0c5195a842e2ee68b5568f8e1c9cd85081a9df17..5b77ab7762e43c6915dc039e4f7a935a0a4d1adf 100644 (file)
@@ -371,7 +371,7 @@ static int max8973_probe(struct i2c_client *client,
        struct max8973_chip *max;
        int ret;
 
-       pdata = client->dev.platform_data;
+       pdata = dev_get_platdata(&client->dev);
 
        if (!pdata && !client->dev.of_node) {
                dev_err(&client->dev, "No Platform data");
index d0c87856dd25fdd7eefaf14f784e6f0ad58a48f2..e8877e4e5a5aad848d3a802c06a0acdaed3993a8 100644 (file)
@@ -765,7 +765,7 @@ static void palmas_dt_to_pdata(struct device *dev,
 static int palmas_regulators_probe(struct platform_device *pdev)
 {
        struct palmas *palmas = dev_get_drvdata(pdev->dev.parent);
-       struct palmas_pmic_platform_data *pdata = pdev->dev.platform_data;
+       struct palmas_pmic_platform_data *pdata = dev_get_platdata(&pdev->dev);
        struct device_node *node = pdev->dev.of_node;
        struct regulator_dev *rdev;
        struct regulator_config config = { };
index 1a73a297fe730533cc6be23469eee0014f6dbe80..b49eaeedea849f5c380059417050bd9d75f2901e 100644 (file)
@@ -243,7 +243,7 @@ static int pcap_regulator_probe(struct platform_device *pdev)
        struct regulator_config config = { };
 
        config.dev = &pdev->dev;
-       config.init_data = pdev->dev.platform_data;
+       config.init_data = dev_get_platdata(&pdev->dev);
        config.driver_data = pcap;
 
        rdev = regulator_register(&pcap_regulators[pdev->id], &config);
index 54df9f7cb504b7da2f4b6c6b26c8389bcdd3f117..0f3576d48abf9733cb87a27231f471ca263cade9 100644 (file)
@@ -86,7 +86,7 @@ static int pcf50633_regulator_probe(struct platform_device *pdev)
        pcf = dev_to_pcf50633(pdev->dev.parent);
 
        config.dev = &pdev->dev;
-       config.init_data = pdev->dev.platform_data;
+       config.init_data = dev_get_platdata(&pdev->dev);
        config.driver_data = pcf;
        config.regmap = pcf->regmap;
 
index 6e67be75ea1b5fc63095980fd24d68591d7b5389..9392a7ca3d2dc6df9152cb1aeb13c776b856e253 100644 (file)
@@ -275,7 +275,7 @@ static int tps51632_probe(struct i2c_client *client,
                }
        }
 
-       pdata = client->dev.platform_data;
+       pdata = dev_get_platdata(&client->dev);
        if (!pdata && client->dev.of_node)
                pdata = of_get_tps51632_platform_data(&client->dev);
        if (!pdata) {
index a490d5b749b2c75efffe33c4249fdf06a83c4e33..0b7ebb1ebf859bb5d409c19114b4a89f40a094b1 100644 (file)
@@ -350,7 +350,7 @@ static int tps62360_probe(struct i2c_client *client,
        int i;
        int chip_id;
 
-       pdata = client->dev.platform_data;
+       pdata = dev_get_platdata(&client->dev);
 
        if (client->dev.of_node) {
                const struct of_device_id *match;
index 9d053e23e9ebd188778d4960409ee3c1baffa540..a15263d4bdff8a2fbd433c1315291def0bf66917 100644 (file)
@@ -218,7 +218,7 @@ static int tps_65023_probe(struct i2c_client *client,
         * init_data points to array of regulator_init structures
         * coming from the board-evm file.
         */
-       init_data = client->dev.platform_data;
+       init_data = dev_get_platdata(&client->dev);
        if (!init_data)
                return -EIO;
 
index 1094393155ed17927e3cafd9170cdaf1fb0bb602..62e8d28beabd7cc8ad51b2935e29b7d348e17438 100644 (file)
@@ -601,7 +601,7 @@ static int pmic_probe(struct spi_device *spi)
        struct regulator_config config = { };
        int ret = 0, i;
 
-       init_data = dev->platform_data;
+       init_data = dev_get_platdata(dev);
        if (!init_data) {
                dev_err(dev, "could not find regulator platform data\n");
                return -EINVAL;
index 93bc4f456da4c2d3d5566427851f5eceaa0082e1..78aae4cbb00424864fbad430fc55379a060065c5 100644 (file)
@@ -1108,7 +1108,7 @@ static int twlreg_probe(struct platform_device *pdev)
                drvdata = NULL;
        } else {
                id = pdev->id;
-               initdata = pdev->dev.platform_data;
+               initdata = dev_get_platdata(&pdev->dev);
                for (i = 0, template = NULL; i < ARRAY_SIZE(twl_of_match); i++) {
                        template = twl_of_match[i].data;
                        if (template && template->desc.id == id)
index a7c8deb5f28fc02f93955f1c2b8f1ddcf2354f9a..765acc11c9c83c151a60f005c770d4639352701c 100644 (file)
@@ -111,7 +111,7 @@ static int regulator_userspace_consumer_probe(struct platform_device *pdev)
        struct userspace_consumer_data *drvdata;
        int ret;
 
-       pdata = pdev->dev.platform_data;
+       pdata = dev_get_platdata(&pdev->dev);
        if (!pdata)
                return -EINVAL;
 
index a9d4284ea007cc83658db17724e976d34dc9aafb..f53e78b9a84eadf1c9b2cded2c1ac00f7b7f055c 100644 (file)
@@ -287,7 +287,7 @@ static const struct attribute_group regulator_virtual_attr_group = {
 
 static int regulator_virtual_probe(struct platform_device *pdev)
 {
-       char *reg_id = pdev->dev.platform_data;
+       char *reg_id = dev_get_platdata(&pdev->dev);
        struct virtual_consumer_data *drvdata;
        int ret;
 
index 46938cf162ad7821403dc97b70b2db3298c86e85..11861cb861df04394ff1de205eb7896c9ab98f89 100644 (file)
@@ -451,7 +451,7 @@ static void wm831x_buckv_dvs_init(struct wm831x_dcdc *dcdc,
 static int wm831x_buckv_probe(struct platform_device *pdev)
 {
        struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
-       struct wm831x_pdata *pdata = wm831x->dev->platform_data;
+       struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
        struct regulator_config config = { };
        int id;
        struct wm831x_dcdc *dcdc;
@@ -624,7 +624,7 @@ static struct regulator_ops wm831x_buckp_ops = {
 static int wm831x_buckp_probe(struct platform_device *pdev)
 {
        struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
-       struct wm831x_pdata *pdata = wm831x->dev->platform_data;
+       struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
        struct regulator_config config = { };
        int id;
        struct wm831x_dcdc *dcdc;
@@ -770,7 +770,7 @@ static struct regulator_ops wm831x_boostp_ops = {
 static int wm831x_boostp_probe(struct platform_device *pdev)
 {
        struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
-       struct wm831x_pdata *pdata = wm831x->dev->platform_data;
+       struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
        struct regulator_config config = { };
        int id = pdev->id % ARRAY_SIZE(pdata->dcdc);
        struct wm831x_dcdc *dcdc;
@@ -880,7 +880,7 @@ static struct regulator_ops wm831x_epe_ops = {
 static int wm831x_epe_probe(struct platform_device *pdev)
 {
        struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
-       struct wm831x_pdata *pdata = wm831x->dev->platform_data;
+       struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
        struct regulator_config config = { };
        int id = pdev->id % ARRAY_SIZE(pdata->epe);
        struct wm831x_dcdc *dcdc;
index 16ebdf94d0a044b6db0111c4d4f9a5c2f8feb5fe..4eb373de1facc63a4041ebc2c2804de358363287 100644 (file)
@@ -151,7 +151,7 @@ static irqreturn_t wm831x_isink_irq(int irq, void *data)
 static int wm831x_isink_probe(struct platform_device *pdev)
 {
        struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
-       struct wm831x_pdata *pdata = wm831x->dev->platform_data;
+       struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
        struct wm831x_isink *isink;
        int id = pdev->id % ARRAY_SIZE(pdata->isink);
        struct regulator_config config = { };
index 76792c7d86f3870116a4907894132621f813d61a..1432b26ef2e97b0830a2ecf973789ee20b7991cc 100644 (file)
@@ -221,7 +221,7 @@ static struct regulator_ops wm831x_gp_ldo_ops = {
 static int wm831x_gp_ldo_probe(struct platform_device *pdev)
 {
        struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
-       struct wm831x_pdata *pdata = wm831x->dev->platform_data;
+       struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
        struct regulator_config config = { };
        int id;
        struct wm831x_ldo *ldo;
@@ -447,7 +447,7 @@ static struct regulator_ops wm831x_aldo_ops = {
 static int wm831x_aldo_probe(struct platform_device *pdev)
 {
        struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
-       struct wm831x_pdata *pdata = wm831x->dev->platform_data;
+       struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
        struct regulator_config config = { };
        int id;
        struct wm831x_ldo *ldo;
@@ -605,7 +605,7 @@ static struct regulator_ops wm831x_alive_ldo_ops = {
 static int wm831x_alive_ldo_probe(struct platform_device *pdev)
 {
        struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
-       struct wm831x_pdata *pdata = wm831x->dev->platform_data;
+       struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
        struct regulator_config config = { };
        int id;
        struct wm831x_ldo *ldo;
index 5453dd0105eda0f40431343b0bafdea1ddcbb739..835b5f0f344ed2537115b1ed486d14860f88434e 100644 (file)
@@ -1201,7 +1201,7 @@ static int wm8350_regulator_probe(struct platform_device *pdev)
        }
 
        config.dev = &pdev->dev;
-       config.init_data = pdev->dev.platform_data;
+       config.init_data = dev_get_platdata(&pdev->dev);
        config.driver_data = dev_get_drvdata(&pdev->dev);
        config.regmap = wm8350->regmap;
 
index 2ac7e1aceb0551a63a49e79bbea24670db85d1d0..58f51bec13f25d2f47a488ca53fc1099bb683762 100644 (file)
@@ -215,7 +215,7 @@ static int wm8400_regulator_probe(struct platform_device *pdev)
        struct regulator_dev *rdev;
 
        config.dev = &pdev->dev;
-       config.init_data = pdev->dev.platform_data;
+       config.init_data = dev_get_platdata(&pdev->dev);
        config.driver_data = wm8400;
        config.regmap = wm8400->regmap;
 
index 8f2a8a7a3f997f5475d305b87f508a47a6daf267..5ee2a208457c2b58e46fb1f1d7a79e8b180c4a35 100644 (file)
@@ -125,7 +125,7 @@ static const struct regulator_init_data wm8994_ldo_default[] = {
 static int wm8994_ldo_probe(struct platform_device *pdev)
 {
        struct wm8994 *wm8994 = dev_get_drvdata(pdev->dev.parent);
-       struct wm8994_pdata *pdata = wm8994->dev->platform_data;
+       struct wm8994_pdata *pdata = dev_get_platdata(wm8994->dev);
        int id = pdev->id % ARRAY_SIZE(pdata->ldo);
        struct regulator_config config = { };
        struct wm8994_ldo *ldo;