Commit 3fede893 authored by Ricardo Ribalda Delgado's avatar Ricardo Ribalda Delgado Committed by Xie XiuQi
Browse files

gpiolib: Add init_valid_mask exported function



mainline inclusion
from mainline-v4.20-rc1
commit f8ec92a9
category: bugfix
bugzilla: 14225
CVE: NA

-------------------------------------------------

Add a function that allows initializing the valid_mask from
gpiochip_add_data.

This prevents race conditions during gpiochip initialization.

If the function is not exported, then the old behaviour is respected,
this is, set all gpios as valid.

Signed-off-by: default avatarRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Tested-by: default avatarJeffrey Hugo <jhugo@codeaurora.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarHanjun Guo <guohanjun@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent da7b158a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment