[PATCH/RFC] Add support for PowerQUICC watchdog

Stephen Rothwell sfr at canb.auug.org.au
Sat Dec 29 15:03:19 EST 2007


Hi Jochen,

Just a couple of suggestions.

On Fri, 28 Dec 2007 16:13:11 +0100 Jochen Friedrich <jochen at 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 at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20071229/c4b9afb2/attachment.pgp>


More information about the Linuxppc-dev mailing list