[PATCH v2] GPIO PL061: Adding Clk framework support

Viresh KUMAR viresh.kumar at st.com
Tue Jun 22 00:42:29 EDT 2010


On 6/22/2010 9:51 AM, Rabin Vincent wrote:
> On Tue, Jun 22, 2010 at 9:37 AM, Viresh KUMAR <viresh.kumar at st.com> wrote:
>> +static int pl061_request(struct gpio_chip *gc, unsigned offset)
>> +{
>> +       struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc);
>> +       int ret;
>> +
>> +       if (offset >= gc->ngpio)
>> +               return -EINVAL;
>> +
>> +       if (chip->clk)
>> +               ret = clk_enable(chip->clk);
>> +
>> +       return ret
> 
> Also, returning uninitialized values when chip->clk is not set.
> 
> You can probably just not register these callbacks for the
> !chip->clk case.
> 

Sorry. Will correct it.



More information about the linux-arm-kernel mailing list