[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20071229150319.1045b2a3.sfr@canb.auug.org.au>
Date: Sat, 29 Dec 2007 15:03:19 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Jochen Friedrich <jochen@...am.de>
Cc: wim@...ana.be, Scott Wood <scottwood@...escale.com>,
linuxppc-dev@...abs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH/RFC] Add support for PowerQUICC watchdog
Hi Jochen,
Just a couple of suggestions.
On Fri, 28 Dec 2007 16:13:11 +0100 Jochen Friedrich <jochen@...am.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@...b.auug.org.au
http://www.canb.auug.org.au/~sfr/
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists