Re: [PATCH/RFC] Add support for PowerQUICC watchdog

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jochen,

Just a couple of suggestions.

On Fri, 28 Dec 2007 16:13:11 +0100 Jochen Friedrich <[email protected]> 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                    [email protected]
http://www.canb.auug.org.au/~sfr/

Attachment: pgpAxXh8oDsOI.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux