]> git.baikalelectronics.ru Git - 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)
commitcc5075cb5b5b68c124deba8e9e9df4d4055c449f
tree6cf391acf47f72c23b6f99b280ae63a4a6166081
parentdce9e8c363b9665e0f2b71cc9470157c6ed606bb
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