gpiolib: cdev: gpio_desc_to_lineinfo() should set info offset
authorKent Gibson <warthog618@gmail.com>
Mon, 28 Sep 2020 00:27:48 +0000 (08:27 +0800)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 30 Sep 2020 08:56:23 +0000 (10:56 +0200)
commit0dc11e3ad353e19b1a119e3146c69c0930ecae5f
treeccc32c2f31883b4202ae40921ada6ce980b5233a
parent42e9acc679105208e001a2911c0241d968ab68e5
gpiolib: cdev: gpio_desc_to_lineinfo() should set info offset

Set the value of the line info offset in gpio_desc_to_lineinfo(), rather
than relying on it being passed in the info.  This makes the function
behave as you would expect from the name - it generates the line info
corresponding to a given GPIO desc.

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