Commit 8deb779d authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Bartosz Golaszewski
Browse files

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
[Bartosz: tweak the commit message]
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent 4ea0c977
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -680,6 +680,19 @@ static void gpiochip_setup_devs(void)
	}
}

/**
 * gpiochip_get_data() - get per-subdriver data for the chip
 * @gc: GPIO chip
 *
 * Returns:
 * The per-subdriver data for the chip.
 */
void *gpiochip_get_data(struct gpio_chip *gc)
{
	return gc->gpiodev->data;
}
EXPORT_SYMBOL_GPL(gpiochip_get_data);

int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
			       struct lock_class_key *lock_key,
			       struct lock_class_key *request_key)
@@ -938,19 +951,6 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
}
EXPORT_SYMBOL_GPL(gpiochip_add_data_with_key);

/**
 * gpiochip_get_data() - get per-subdriver data for the chip
 * @gc: GPIO chip
 *
 * Returns:
 * The per-subdriver data for the chip.
 */
void *gpiochip_get_data(struct gpio_chip *gc)
{
	return gc->gpiodev->data;
}
EXPORT_SYMBOL_GPL(gpiochip_get_data);

/**
 * gpiochip_remove() - unregister a gpio_chip
 * @gc: the chip to unregister