]> git.baikalelectronics.ru Git - kernel.git/commit
reset: Fix devm bulk optional exclusive control getter
authorBaikal Electronics <support@baikalelectronics.ru>
Fri, 24 Jun 2022 14:18:45 +0000 (17:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:24:15 +0000 (21:24 +0200)
commitbb85c55a45136b481c4bea97b20d003578d2c67c
tree9cace03c62cf11765fc1bca7da9135ee7f464197
parent6600afa81c72f6cab39d2c91f8fbc1a897a7be19
reset: Fix devm bulk optional exclusive control getter

[ Upstream commit f2f1befc2ac4bfa48a4094706ac7c264a6e2d657 ]

Most likely due to copy-paste mistake the device managed version of the
denoted reset control getter has been implemented with invalid semantic,
which can be immediately spotted by having "WARN_ON(shared && acquired)"
warning in the system log as soon as the method is called. Anyway let's
fix it by altering the boolean arguments passed to the
__devm_reset_control_bulk_get() method from
- shared = true, optional = false, acquired = true
to
+ shared = false, optional = true, acquired = true
That's what they were supposed to be in the first place (see the non-devm
version of the same method: reset_control_bulk_get_optional_exclusive()).

Fixes: cec9b8a9b3d8 ("reset: Add reset_control_bulk API")
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20220624141853.7417-2-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/reset.h