* [PATCH] input/wm97xx: make missing platform data non-fatal
@ 2017-01-05 15:43 Manuel Lauss
2017-01-22 11:11 ` Robert Jarzmik
0 siblings, 1 reply; 3+ messages in thread
From: Manuel Lauss @ 2017-01-05 15:43 UTC (permalink / raw)
To: linux-input; +Cc: Robert Jarzmik, Manuel Lauss
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.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
---
drivers/input/touchscreen/wm97xx-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
index 83cf11312fd9..c9d1c91e1887 100644
--- a/drivers/input/touchscreen/wm97xx-core.c
+++ b/drivers/input/touchscreen/wm97xx-core.c
@@ -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;
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] input/wm97xx: make missing platform data non-fatal
2017-01-05 15:43 [PATCH] input/wm97xx: make missing platform data non-fatal Manuel Lauss
@ 2017-01-22 11:11 ` Robert Jarzmik
2017-01-24 18:13 ` Dmitry Torokhov
0 siblings, 1 reply; 3+ messages in thread
From: Robert Jarzmik @ 2017-01-22 11:11 UTC (permalink / raw)
To: Manuel Lauss; +Cc: linux-input
Manuel Lauss <manuel.lauss@gmail.com> writes:
> 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.
>
> Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
I can't remember if I replied to this one ... so
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cheers.
--
Robert
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] input/wm97xx: make missing platform data non-fatal
2017-01-22 11:11 ` Robert Jarzmik
@ 2017-01-24 18:13 ` Dmitry Torokhov
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2017-01-24 18:13 UTC (permalink / raw)
To: Robert Jarzmik; +Cc: Manuel Lauss, linux-input
On Sun, Jan 22, 2017 at 12:11:22PM +0100, Robert Jarzmik wrote:
> Manuel Lauss <manuel.lauss@gmail.com> writes:
>
> > 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.
> >
> > Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
> I can't remember if I replied to this one ... so
>
> Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
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.
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-24 18:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-05 15:43 [PATCH] input/wm97xx: make missing platform data non-fatal Manuel Lauss
2017-01-22 11:11 ` Robert Jarzmik
2017-01-24 18:13 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).