2011/2/23 Kristen Carlson Accardi <[email protected]>:
> If chip can sleep, pick the correct set/get_value routine in gpiolib
> so that drivers don't have to.
>
> Signed-off-by: Kristen Carlson Accardi <[email protected]>
> ---
>  drivers/gpio/gpiolib.c |   12 ++++++++----
>  1 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index 649550e..f477ff8 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -1548,8 +1548,10 @@ int __gpio_get_value(unsigned gpio)
>        struct gpio_chip        *chip;
>
>        chip = gpio_to_chip(gpio);
> -       WARN_ON(chip->can_sleep);
> -       return chip->get ? chip->get(chip, gpio - chip->base) : 0;
> +       if (chip->can_sleep)
> +               return gpio_get_value_cansleep(gpio);
> +       else
> +               return chip->get ? chip->get(chip, gpio - chip->base) : 0;
>  }
>  EXPORT_SYMBOL_GPL(__gpio_get_value);
>

Just share information to you. It works fine to avoid slowpath
messages from pmic_gpio on booting.
_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to