Skip to content

Commit

Permalink
wm97xx-core: Pass platform_data to battery
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marek Vasut authored and Anton Vorontsov committed Sep 4, 2009
1 parent 8d631cc commit 32bb0e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/input/touchscreen/wm97xx-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ static void wm97xx_ts_input_close(struct input_dev *idev)
static int wm97xx_probe(struct device *dev)
{
struct wm97xx *wm;
struct wm97xx_pdata *pdata = dev->platform_data;
int ret = 0, id = 0;

wm = kzalloc(sizeof(struct wm97xx), GFP_KERNEL);
Expand Down Expand Up @@ -656,6 +657,7 @@ static int wm97xx_probe(struct device *dev)
}
platform_set_drvdata(wm->battery_dev, wm);
wm->battery_dev->dev.parent = dev;
wm->battery_dev->dev.platform_data = pdata;
ret = platform_device_add(wm->battery_dev);
if (ret < 0)
goto batt_reg_err;
Expand All @@ -669,6 +671,7 @@ static int wm97xx_probe(struct device *dev)
}
platform_set_drvdata(wm->touch_dev, wm);
wm->touch_dev->dev.parent = dev;
wm->touch_dev->dev.platform_data = pdata;
ret = platform_device_add(wm->touch_dev);
if (ret < 0)
goto touch_reg_err;
Expand Down

0 comments on commit 32bb0e0

Please sign in to comment.