Skip to content

Commit 8deb779

Browse files
andy-shevBartosz Golaszewski
authored andcommitted
gpiolib: Move gpiochip_get_data() higher in the code
Move gpiochip_get_data() higher in the code as a preparation for further refactoring. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> [Bartosz: tweak the commit message] Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
1 parent 4ea0c97 commit 8deb779

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

drivers/gpio/gpiolib.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,19 @@ static void gpiochip_setup_devs(void)
680680
}
681681
}
682682

683+
/**
684+
* gpiochip_get_data() - get per-subdriver data for the chip
685+
* @gc: GPIO chip
686+
*
687+
* Returns:
688+
* The per-subdriver data for the chip.
689+
*/
690+
void *gpiochip_get_data(struct gpio_chip *gc)
691+
{
692+
return gc->gpiodev->data;
693+
}
694+
EXPORT_SYMBOL_GPL(gpiochip_get_data);
695+
683696
int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
684697
struct lock_class_key *lock_key,
685698
struct lock_class_key *request_key)
@@ -938,19 +951,6 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
938951
}
939952
EXPORT_SYMBOL_GPL(gpiochip_add_data_with_key);
940953

941-
/**
942-
* gpiochip_get_data() - get per-subdriver data for the chip
943-
* @gc: GPIO chip
944-
*
945-
* Returns:
946-
* The per-subdriver data for the chip.
947-
*/
948-
void *gpiochip_get_data(struct gpio_chip *gc)
949-
{
950-
return gc->gpiodev->data;
951-
}
952-
EXPORT_SYMBOL_GPL(gpiochip_get_data);
953-
954954
/**
955955
* gpiochip_remove() - unregister a gpio_chip
956956
* @gc: the chip to unregister

0 commit comments

Comments
 (0)