gpio: sim: fix setting and getting multiple lines
authorBartosz Golaszewski <brgl@bgdev.pl>
Wed, 13 Apr 2022 14:01:32 +0000 (16:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 07:36:25 +0000 (09:36 +0200)
commite9759635e9135b3997376c94d8bd708a59d5b781
tree2f1cec076fa584a3cb3c918121e258e10f0d1860
parent8687e78e4523fa80a6b0c45f2ffaec332eb44617
gpio: sim: fix setting and getting multiple lines

commit 3836c73e6a2585561af928c6641d74528a8bdfa4 upstream.

We need to take mask into account in the set/get_multiple() callbacks.
Use bitmap_replace() instead of bitmap_copy().

Fixes: cb8c474e79be ("gpio: sim: new testing module")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-sim.c