aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/pcengines-apuv2.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-08-06 13:55:15 +0200
committerHans de Goede <hdegoede@redhat.com>2021-08-06 14:04:43 +0200
commit9d7b132e62e41b7d49bf157aeaf9147c27492e0f (patch)
tree70701aba768d616a854fc502452a214b5f9e6f77 /drivers/platform/x86/pcengines-apuv2.c
parentplatform/x86: Make dual_accel_detect() KIOX010A + KIOX020A detect more robust (diff)
downloadlinux-dev-9d7b132e62e41b7d49bf157aeaf9147c27492e0f.tar.xz
linux-dev-9d7b132e62e41b7d49bf157aeaf9147c27492e0f.zip
platform/x86: pcengines-apuv2: Add missing terminating entries to gpio-lookup tables
The gpiod_lookup_table.table passed to gpiod_add_lookup_table() must be terminated with an empty entry, add this. Note we have likely been getting away with this not being present because the GPIO lookup code first matches on the dev_id, causing most lookups to skip checking the table and the lookups which do check the table will find a matching entry before reaching the end. With that said, terminating these tables properly still is obviously the correct thing to do. Fixes: f8eb0235f659 ("x86: pcengines apuv2 gpio/leds/keys platform driver") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210806115515.12184-1-hdegoede@redhat.com
Diffstat (limited to 'drivers/platform/x86/pcengines-apuv2.c')
-rw-r--r--drivers/platform/x86/pcengines-apuv2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/x86/pcengines-apuv2.c b/drivers/platform/x86/pcengines-apuv2.c
index c37349f97bb8..d063d91db9bc 100644
--- a/drivers/platform/x86/pcengines-apuv2.c
+++ b/drivers/platform/x86/pcengines-apuv2.c
@@ -94,6 +94,7 @@ static struct gpiod_lookup_table gpios_led_table = {
NULL, 1, GPIO_ACTIVE_LOW),
GPIO_LOOKUP_IDX(AMD_FCH_GPIO_DRIVER_NAME, APU2_GPIO_LINE_LED3,
NULL, 2, GPIO_ACTIVE_LOW),
+ {} /* Terminating entry */
}
};
@@ -123,6 +124,7 @@ static struct gpiod_lookup_table gpios_key_table = {
.table = {
GPIO_LOOKUP_IDX(AMD_FCH_GPIO_DRIVER_NAME, APU2_GPIO_LINE_MODESW,
NULL, 0, GPIO_ACTIVE_LOW),
+ {} /* Terminating entry */
}
};