]> www.infradead.org Git - nvme.git/commit
gpiolib: Allow to use setters with return value for output-only gpios
authorMathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Fri, 11 Apr 2025 14:52:09 +0000 (16:52 +0200)
committerBartosz Golaszewski <brgl@bgdev.pl>
Mon, 14 Apr 2025 18:31:00 +0000 (20:31 +0200)
commitb424bb88afb6719b30340f059bf50953424cdd9d
tree52791d27d93e1b9c9a605392fc0b5f153c67ef1a
parent8ffd015db85fea3e15a77027fda6c02ced4d2444
gpiolib: Allow to use setters with return value for output-only gpios

The gpiod_direction_output_raw_commit() function checks if any setter
callback is present before doing anything. As the new GPIO setters with
return values were introduced, make this check also succeed if one is
present.

Fixes: 98ce1eb1fd87 ("gpiolib: introduce gpio_chip setters that return values")
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Link: https://lore.kernel.org/r/20250411-mdb-gpiolib-setters-fix-v2-1-9611280d8822@bootlin.com
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpiolib.c