Commit 3c51c548 authored by Matti Vaittinen's avatar Matti Vaittinen Committed by Zheng Zengkai
Browse files

gpio: sysfs: Obey valid_mask



stable inclusion
from stable-5.10.32
commit f567fde02baa8f3d9fe5699f202faf125f96bd0f
bugzilla: 51796

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

[ Upstream commit 23cf00dd ]

Do not allow exporting GPIOs which are set invalid
by the driver's valid mask.

Fixes: 726cb3ba ("gpiolib: Support 'gpio-reserved-ranges' property")
Signed-off-by: default avatarMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 813c9b78
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment