From: Manuel Lauss <manuel.lauss@gmail.com>
To: linux-input@vger.kernel.org
Cc: Manuel Lauss <manuel.lauss@gmail.com>,
patches@opensource.wolfsonmicro.com,
Robert Jarzmik <robert.jarzmik@free.fr>
Subject: [PATCH RESEND] input/wm97xx: make missing platform data non-fatal
Date: Thu, 19 Jan 2017 09:43:53 +0100 [thread overview]
Message-ID: <20170119084353.4250-1-manuel.lauss@gmail.com> (raw)
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. Touchscreen continues
to work fine, and I don't have any battery hooked up
to it either, so I'm not missing any functionality.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Cc: linux-input@vger.kernel.org
Cc: patches@opensource.wolfsonmicro.com
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
---
Resend, added Maintainers to Cc.
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
next reply other threads:[~2017-01-19 8:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 8:43 Manuel Lauss [this message]
2017-01-19 9:10 ` [PATCH RESEND] input/wm97xx: make missing platform data non-fatal Charles Keepax
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170119084353.4250-1-manuel.lauss@gmail.com \
--to=manuel.lauss@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
--cc=robert.jarzmik@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.