Re: [PATCH 1/2] clk: Fix error handling in fixed clock hardware typeregister fn
From: Turquette, Mike
Date: Wed Mar 21 2012 - 15:56:50 EST
On Wed, Mar 21, 2012 at 2:07 AM, Russell King - ARM Linux
<linux@xxxxxxxxxxxxxxxx> wrote:
> On Tue, Mar 20, 2012 at 10:45:36PM -0700, Turquette, Mike wrote:
>> IIRC, that discussion was with respect to the .parent member of struct
>> clk. It was decided that having .parent = NULL does not imply that a
>> clock is a root clock, but instead we rely on the CLK_IS_ROOT flag. I
>> can't think of any other instance where a NULL clk when returned from
>> a registration function would be useful.
>
> No. What I've been saying is that in _drivers_ which use clk_get(),
> the error range is defined by IS_ERR(clk). Every other value of
> clk must be assumed by the driver to be valid, no ifs or buts.
Drivers certainly might make calls to clk_register_foo, despite it
being outside of the traditional clock api. For the sake of
consistency I'll convert the clk_register_foo functions to return
error codes.
Regards,
Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/