提交 5649d8f9 编写于 作者: F Fabio Baltieri 提交者: Samuel Ortiz

mfd: ab8500-sysctrl: Let sysctrl driver work without pdata

A check for a valid plat->sysctrl was introduced in:

2377e52f mfd: ab8500-sysctrl: Error check clean up

but the driver works just fine even without that initialization data,
and enforcing it breaks existing platforms for no reason.

This patch removes the check and let the driver go ahead with probe.
Acked-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NFabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 e9d7b4b5
......@@ -104,7 +104,7 @@ void ab8500_restart(char mode, const char *cmd)
plat = dev_get_platdata(sysctrl_dev->parent);
pdata = plat->sysctrl;
if (pdata->reboot_reason_code)
if (pdata && pdata->reboot_reason_code)
reason = pdata->reboot_reason_code(cmd);
else
pr_warn("[%s] No reboot reason set. Default reason %d\n",
......@@ -188,7 +188,7 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)
plat = dev_get_platdata(pdev->dev.parent);
if (!(plat && plat->sysctrl))
if (!plat)
return -EINVAL;
sysctrl_dev = &pdev->dev;
......@@ -197,7 +197,6 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)
pm_power_off = ab8500_power_off;
pdata = plat->sysctrl;
if (pdata) {
int last, ret, i, j;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册