Skip to content

Commit

Permalink
Input: wm97xx - make missing platform data non-fatal
Browse files Browse the repository at this point in the history
Commit 6480af4 ("power_supply: wm97xx_battery: use
power_supply_get_drvdata") made wm97xx platform data mandatory, although
it's still optional.

This patch fixes an oops during driver probe on one of my MIPS boards with
a wm9712.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Manuel Lauss authored and Dmitry Torokhov committed Jan 24, 2017
1 parent 62ed8ce commit 3f5c34c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/wm97xx-core.c
Original file line number Diff line number Diff line change
@@ -682,7 +682,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->batt_pdata;
wm->battery_dev->dev.platform_data = pdata ? pdata->batt_pdata : NULL;
ret = platform_device_add(wm->battery_dev);
if (ret < 0)
goto batt_reg_err;

0 comments on commit 3f5c34c

Please sign in to comment.