input/wm97xx: make missing platform data non-fatal
Subsystems (3)
PATCH 1/1 input/wm97xx: make missing platform data non-fatal
Commit 6480af4915d6 ("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.
--- drivers/input/touchscreen/wm97xx-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/touchscreen/wm97xx-core.c +1 -1
@@ -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;
Signature · 1 line
2.11.0
Quoted 8 lines · Manuel Lauss
Commit
6480af4915d6("power_supply:wm97xx_battery: usepower_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 <[email protected]>
I can't remember if I replied to this one ... so
Cheers.
Signature · 1 line
Robert
Quoted 6 lines · Robert Jarzmik
Quoted 4 lines · Manuel Lauss
Commit
6480af4915d6("power_supply:wm97xx_battery: usepower_supply_get_drvdata") made wm97xx platform data mandatory, although it's still optional.
Quoted 7 lines
Quoted 4 lines
This patch fixes an oops during driver probe on one of my MIPS boards with a wm9712.
Signed-off-by Manuel Lauss <[email protected]>I can't remember if I replied to this one ... so
Reviewed-by Robert Jarzmik <[email protected]>
Applied, thank you.
In the future it is helpful to cc me directly on the patch instead of sending it to the list only so there is less chance it gets missed.
Thanks.
Signature · 1 line
Dmitry