[PATCH] CLKDEV: Add helper routines to allocate and add clkdevs for given struct clk *

Viresh Kumar viresh.kumar at st.com
Mon Apr 16 23:34:15 EDT 2012


On 4/17/2012 2:16 AM, Domenico Andreoli wrote:
>> > +struct clk_lookup * __init_refok
>> > +clkdev_alloc(struct clk *clk, const char *con_id, const char *dev_fmt, ...)
>> > +{
>> > +	struct clk_lookup * cl;
>> > +	va_list ap = NULL;

> so I finally tested it with this modification:
> 
> 	if (dev_fmt) {
> 		va_start(ap, dev_fmt);
> 		cl = clkdev_alloc_valist(clk, con_id, dev_fmt, ap);
> 		va_end(ap);
> 	} else
> 		cl = clkdev_alloc(clk, con_id, NULL);

Isn't this a infinite loop now, when dev_fmt is passed as NULL?


-- 
viresh



More information about the linux-arm-kernel mailing list