[PATCH v2] GPIO PL061: Adding Clk framework support

Rabin Vincent rabin at rab.in
Tue Jun 22 00:21:16 EDT 2010


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

Missing semicolon.

Also, returning uninitialized values when chip->clk is not set.

You can probably just not register these callbacks for the
!chip->clk case.

Rabin



More information about the linux-arm-kernel mailing list