From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mx35_3ds: Add watchdog support
Date: Mon, 15 Nov 2010 19:04:21 +0000 [thread overview]
Message-ID: <20101115190421.GF31421@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <78127.99191.qm@web51001.mail.re2.yahoo.com>
On Mon, Nov 15, 2010 at 09:31:34AM -0800, Fabio Estevam wrote:
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index 2ee7dac..63f600c 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -270,10 +270,12 @@ static int __init imx2_wdt_probe(struct
> platform_device *pdev)
> return -ENOMEM;
> }
>
> - imx2_wdt.clk = clk_get_sys("imx-wdt.0", NULL);
> - if (IS_ERR(imx2_wdt.clk)) {
> - dev_err(&pdev->dev, "can't get Watchdog clock\n");
> - return PTR_ERR(imx2_wdt.clk);
> + if (!cpu_is_mx51()) {
> + imx2_wdt.clk = clk_get_sys("imx-wdt.0", NULL);
> + if (IS_ERR(imx2_wdt.clk)) {
> + dev_err(&pdev->dev, "can't get Watchdog clock\n");
> + return PTR_ERR(imx2_wdt.clk);
> + }
> }
Why not do what we do on other platforms (such as omap) and provide a dummy
imx-wdt.0 clock for non-MX51 CPUs? Then you don't need to code such stuff
into drivers.
next prev parent reply other threads:[~2010-11-15 19:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-15 14:31 [PATCH] mx35_3ds: Add watchdog support Fabio Estevam
2010-11-15 15:52 ` Uwe Kleine-König
2010-11-15 17:31 ` Fabio Estevam
2010-11-15 19:04 ` Russell King - ARM Linux [this message]
2010-11-16 6:38 ` Uwe Kleine-König
2010-11-16 9:25 ` Fabio Estevam
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=20101115190421.GF31421@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/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).