Skip to content
  • Alexandre Courbot's avatar
    gpio: move gpio_ensure_requested() into legacy C file · d82da797
    Alexandre Courbot authored and Linus Walleij's avatar Linus Walleij committed
    
    
    gpio_ensure_requested() only makes sense when using the integer-based
    GPIO API, so make sure it is called from there instead of the gpiod
    API which we know cannot be called with a non-requested GPIO anyway.
    
    The uses of gpio_ensure_requested() in the gpiod API were kind of
    out-of-place anyway, so putting them in gpio-legacy.c helps clearing the
    code.
    
    Actually, considering the time this ensure_requested mechanism has been
    around, maybe we should just turn this patch into "remove
    gpio_ensure_requested()" if we know for sure that no user depend on it
    anymore?
    
    Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    d82da797