From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Jochen Friedrich <jochen@scram.de>
Cc: wim@iguana.be, Scott Wood <scottwood@freescale.com>,
linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH/RFC] Add support for PowerQUICC watchdog
Date: Sat, 29 Dec 2007 15:03:19 +1100 [thread overview]
Message-ID: <20071229150319.1045b2a3.sfr@canb.auug.org.au> (raw)
In-Reply-To: <47751287.6000801@scram.de>
[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]
Hi Jochen,
Just a couple of suggestions.
On Fri, 28 Dec 2007 16:13:11 +0100 Jochen Friedrich <jochen@scram.de> wrote:
>
> +int __init pq_wdt_early_init(void)
> +{
>
> + data = of_get_property(soc, "bus-frequency", NULL);
> + if (!data) {
> + of_node_put(soc);
> + printk(KERN_ERR "Could not find bus-frequency in soc node\n");
> + ret = -ENODEV;
> + goto out;
> + }
> + of_node_put(soc);
If you move the "of_node_put(soc)" just above the "if (!data)" then you
won't need to repeat it.
> +static struct of_platform_driver pq_wdt_driver = {
> + .owner = THIS_MODULE,
> + .name = "pq-wdt",
> + .match_table = pq_wdt_match,
> + .probe = pq_wdt_probe,
> + .remove = pq_wdt_remove,
> +};
We are removing the owner and name fields from struct of_platform_driver, so the preferred initialization looks like this:
static struct of_platform_driver pq_wdt_driver = {
.match_table = pq_wdt_match,
.probe = pq_wdt_probe,
.remove = pq_wdt_remove,
.driver = {
.name = "pq-wdt",
.owner = THIS_MODULE,
}
};
or similar.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2007-12-29 4:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-28 15:13 Jochen Friedrich
2007-12-29 4:03 ` Stephen Rothwell [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=20071229150319.1045b2a3.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=jochen@scram.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=scottwood@freescale.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
all inboxes | Powered by JetHome®