Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gpio: shared: extend the ifdef guard to gpio_shared_find_entry()

While this function is supposed to be used by all scanning functions, so
far we only have a single one for OF trees. Once we add support for ACPI
and software nodes, we'll drop the CONFIG_OF guard around this routine
but in order to avoid build warnings, let's extend it to cover it in the
meantime.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511180232.EItKeYjY-lkp@intel.com/
Link: https://lore.kernel.org/r/20251118-gpiolib-shared-of-guard-v1-1-e4ef149a2e0b@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

+1 -1
+1 -1
drivers/gpio/gpiolib-shared.c
··· 58 58 static DEFINE_MUTEX(gpio_shared_lock); 59 59 static DEFINE_IDA(gpio_shared_ida); 60 60 61 + #if IS_ENABLED(CONFIG_OF) 61 62 static struct gpio_shared_entry * 62 63 gpio_shared_find_entry(struct fwnode_handle *controller_node, 63 64 unsigned int offset) ··· 73 72 return NULL; 74 73 } 75 74 76 - #if IS_ENABLED(CONFIG_OF) 77 75 static int gpio_shared_of_traverse(struct device_node *curr) 78 76 { 79 77 struct gpio_shared_entry *entry;