wm97xx-core: Pass platform_data to battery
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
This commit is contained in:
parent
8d631ccff8
commit
32bb0e0c77
|
@ -561,6 +561,7 @@ static void wm97xx_ts_input_close(struct input_dev *idev)
|
||||||
static int wm97xx_probe(struct device *dev)
|
static int wm97xx_probe(struct device *dev)
|
||||||
{
|
{
|
||||||
struct wm97xx *wm;
|
struct wm97xx *wm;
|
||||||
|
struct wm97xx_pdata *pdata = dev->platform_data;
|
||||||
int ret = 0, id = 0;
|
int ret = 0, id = 0;
|
||||||
|
|
||||||
wm = kzalloc(sizeof(struct wm97xx), GFP_KERNEL);
|
wm = kzalloc(sizeof(struct wm97xx), GFP_KERNEL);
|
||||||
|
@ -656,6 +657,7 @@ static int wm97xx_probe(struct device *dev)
|
||||||
}
|
}
|
||||||
platform_set_drvdata(wm->battery_dev, wm);
|
platform_set_drvdata(wm->battery_dev, wm);
|
||||||
wm->battery_dev->dev.parent = dev;
|
wm->battery_dev->dev.parent = dev;
|
||||||
|
wm->battery_dev->dev.platform_data = pdata;
|
||||||
ret = platform_device_add(wm->battery_dev);
|
ret = platform_device_add(wm->battery_dev);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto batt_reg_err;
|
goto batt_reg_err;
|
||||||
|
@ -669,6 +671,7 @@ static int wm97xx_probe(struct device *dev)
|
||||||
}
|
}
|
||||||
platform_set_drvdata(wm->touch_dev, wm);
|
platform_set_drvdata(wm->touch_dev, wm);
|
||||||
wm->touch_dev->dev.parent = dev;
|
wm->touch_dev->dev.parent = dev;
|
||||||
|
wm->touch_dev->dev.platform_data = pdata;
|
||||||
ret = platform_device_add(wm->touch_dev);
|
ret = platform_device_add(wm->touch_dev);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto touch_reg_err;
|
goto touch_reg_err;
|
||||||
|
|
Loading…
Reference in New Issue