From: Tomasz Figa <tomasz.figa@gmail.com>
To: Leela Krishna Amudala <l.krishna@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com,
wim@iguana.be, t.figa@samsung.com, devicetree@vger.kernel.org,
dianders@chromium.org, linux-watchdog@vger.kernel.org,
cpgs@samsung.com, sachin.kamat@linaro.org
Subject: Re: [PATCH V6 3/3] watchdog: s3c2410_wdt: use syscon regmap interface to configure pmu register
Date: Sun, 10 Nov 2013 20:13:43 +0100 [thread overview]
Message-ID: <3426745.Yob7zMjee0@flatron> (raw)
In-Reply-To: <1383825078-24515-4-git-send-email-l.krishna@samsung.com>
Hi Leela,
On Thursday 07 of November 2013 17:21:18 Leela Krishna Amudala wrote:
> The syscon regmap interface is used to configure AUTOMATIC_WDT_RESET_DISABLE
> and MASK_WDT_RESET_REQUEST registers of PMU to mask/unmask enable/disable of
> watchdog in probe and s2r scenarios.
>
> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> ---
> .../devicetree/bindings/watchdog/samsung-wdt.txt | 21 ++-
> drivers/watchdog/s3c2410_wdt.c | 139 ++++++++++++++++++--
> 2 files changed, 151 insertions(+), 9 deletions(-)
[snip]
> diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
> index 23aad7c..a151c20 100644
> --- a/drivers/watchdog/s3c2410_wdt.c
> +++ b/drivers/watchdog/s3c2410_wdt.c
[snip]
> +/* s3c2410_get_wdt_driver_data */
> +static inline struct s3c2410_wdt_variant *
> +get_wdt_drv_data(struct platform_device *pdev)
> +{
> +#ifdef CONFIG_OF
> + if (pdev->dev.of_node) {
> + const struct of_device_id *match;
> + match = of_match_node(s3c2410_wdt_match, pdev->dev.of_node);
> + return (struct s3c2410_wdt_variant *)match->data;
> + }
> +#endif
> + return (struct s3c2410_wdt_variant *)
> + platform_get_device_id(pdev)->driver_data;
This code calls platform_get_device_id(), but I don't see any array of
platform_device_id in this driver. This will always crash on a NULL
pointer dereference whenever booted on a platform using board files.
Also, as this driver is now using syscon API, its Kconfig entry should
select MFD_SYSCON.
Other than that, the patch looks fine.
Best regards,
Tomasz
prev parent reply other threads:[~2013-11-10 19:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-07 11:51 [PATCH V6 0/3] Add watchdog DT nodes and use syscon regmap interfac to configure pmu registers Leela Krishna Amudala
2013-11-07 11:51 ` [PATCH V6 1/3] ARM: dts: Add pmu sysreg node to Exynos5 dtsi file Leela Krishna Amudala
2013-11-10 19:23 ` Tomasz Figa
2013-11-07 11:51 ` [PATCH V6 2/3] ARM: dts: add watchdog device nodes for Exynos5250 and Exynos5420 Leela Krishna Amudala
2013-11-10 19:27 ` Tomasz Figa
2013-11-07 11:51 ` [PATCH V6 3/3] watchdog: s3c2410_wdt: use syscon regmap interface to configure pmu register Leela Krishna Amudala
2013-11-10 19:13 ` Tomasz Figa [this message]
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=3426745.Yob7zMjee0@flatron \
--to=tomasz.figa@gmail.com \
--cc=cpgs@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=kgene.kim@samsung.com \
--cc=l.krishna@samsung.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=sachin.kamat@linaro.org \
--cc=t.figa@samsung.com \
--cc=wim@iguana.be \
/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 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).