]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
gpiolib: cdev: remove recalculation of offset
authorKent Gibson <warthog618@gmail.com>
Wed, 8 Jul 2020 04:15:54 +0000 (12:15 +0800)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Sun, 12 Jul 2020 08:22:01 +0000 (10:22 +0200)
commit1bf7ba400173c3a134aae3187b550d79c2a5f585
tree6cf391acf47f72c23b6f99b280ae63a4a6166081
parentf30ef3e8376380c5be9de121517c713527cf0813
gpiolib: cdev: remove recalculation of offset

Remove recalculation of offset from desc, where desc itself was calculated
from offset.

There is no benefit from the desc -> hwgpio conversion in this context.
The only implicit benefit of the offset -> desc -> hwgpio is
the range check in the offset -> desc, but where desc is required you
still get that, and where desc isn't required it is simpler to perform
the range check directly.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpiolib-cdev.c