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

staging: gpib: Re-order the lookup tables

Re-order the tables so that the bcm27xx table is used first
as these devices are more popular and numerous than the older ones.
This is slightly more efficient for the later pi3 and subsequent models
but should not be noticable in practice for all users.

Signed-off-by: Dave Penkler <dpenkler@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20241104175014.12317-12-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dave Penkler and committed by
Greg Kroah-Hartman
3c2ae0cb 8e938122

+3 -3
+3 -3
drivers/staging/gpib/gpio/gpib_bitbang.c
··· 202 202 203 203 /* Lookup table for general GPIOs */ 204 204 205 - static struct gpiod_lookup_table gpib_gpio_table_0 = { 205 + static struct gpiod_lookup_table gpib_gpio_table_1 = { 206 206 // for bcm2835/6 207 207 .dev_id = "", // device id of board device 208 208 .table = { ··· 232 232 }, 233 233 }; 234 234 235 - static struct gpiod_lookup_table gpib_gpio_table_2 = { 235 + static struct gpiod_lookup_table gpib_gpio_table_0 = { 236 236 .dev_id = "", // device id of board device 237 237 .table = { 238 238 // for bcm27xx based pis (b b+ 2b 3b 3b+ 4 5) ··· 264 264 265 265 static struct gpiod_lookup_table *lookup_tables[] = { 266 266 &gpib_gpio_table_0, 267 - &gpib_gpio_table_2, 267 + &gpib_gpio_table_1, 268 268 0 269 269 }; 270 270