Re: [PATCH V2] mpc512x/clock: fix clk_get logic

2009-11-02 Thread Grant Likely
On Fri, Oct 30, 2009 at 10:53 AM, Wolfram Sang w.s...@pengutronix.de wrote: +       bool id_matched = !id; +       bool dev_matched = !dev; [...] +                       dev_matched = true; +               if (id strcmp(id, p-name) == 0) +                       id_matched = true; Using

Re: [PATCH V2] mpc512x/clock: fix clk_get logic

2009-11-02 Thread Stephen Rothwell
Hi Grant, On Mon, 2 Nov 2009 10:48:58 -0700 Grant Likely grant.lik...@secretlab.ca wrote: Using bool/true/false doesn't seem to be a common pattern in the kernel. Anyone know what the winds of prevailing opinion are regarding 'bool' in kernel code? Its a good thing. -- Cheers, Stephen

Re: [PATCH V2] mpc512x/clock: fix clk_get logic

2009-11-02 Thread Grant Likely
On Mon, Nov 2, 2009 at 4:10 PM, Stephen Rothwell s...@canb.auug.org.au wrote: Hi Grant, On Mon, 2 Nov 2009 10:48:58 -0700 Grant Likely grant.lik...@secretlab.ca wrote: Using bool/true/false doesn't seem to be a common pattern in the kernel.  Anyone know what the winds of prevailing opinion

[PATCH V2] mpc512x/clock: fix clk_get logic

2009-10-30 Thread Wolfram Sang
The current matching logic returns a clock even if only one out of two arguments matches. This is wrong as devices may utilize more than one clock, so only the first clock out of those is returned if the dev-match alone is considered sufficent (noticed while working on the CAN driver). The