staging: gpib: Re-order the lookup tables
authorDave Penkler <dpenkler@gmail.com>
Mon, 4 Nov 2024 17:50:12 +0000 (18:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Nov 2024 08:27:35 +0000 (09:27 +0100)
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>
drivers/staging/gpib/gpio/gpib_bitbang.c

index 78032af5061c16b40e2180374f082fec14ded3bf..a2d562cbd65b43bd902c6ba6f1c117323423abf2 100644 (file)
@@ -202,7 +202,7 @@ int gpios_vector[] = {
 
 /* Lookup table for general GPIOs */
 
-static struct gpiod_lookup_table gpib_gpio_table_0 = {
+static struct gpiod_lookup_table gpib_gpio_table_1 = {
        // for bcm2835/6
        .dev_id = "",    // device id of board device
        .table = {
@@ -232,7 +232,7 @@ static struct gpiod_lookup_table gpib_gpio_table_0 = {
        },
 };
 
-static struct gpiod_lookup_table gpib_gpio_table_2 = {
+static struct gpiod_lookup_table gpib_gpio_table_0 = {
        .dev_id = "",    // device id of board device
        .table = {
                // for bcm27xx based pis (b b+ 2b 3b 3b+ 4 5)
@@ -264,7 +264,7 @@ static struct gpiod_lookup_table gpib_gpio_table_2 = {
 
 static struct gpiod_lookup_table *lookup_tables[] = {
        &gpib_gpio_table_0,
-       &gpib_gpio_table_2,
+       &gpib_gpio_table_1,
        0
 };