]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
platform/x86: pcengines-apuv2: Add missing terminating entries to gpio-lookup tables
authorHans de Goede <hdegoede@redhat.com>
Fri, 6 Aug 2021 11:55:15 +0000 (13:55 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 24 Sep 2021 09:57:04 +0000 (11:57 +0200)
commit7060f6839769a8fbefdb6d9f22d48a9e573e2128
tree632b7e21fc31dbe4b14099de436d031a9ccb4507
parentae278169b16b01fd563a89043098e020768217d5
platform/x86: pcengines-apuv2: Add missing terminating entries to gpio-lookup tables

BugLink: https://bugs.launchpad.net/bugs/1943756
[ Upstream commit 9d7b132e62e41b7d49bf157aeaf9147c27492e0f ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/platform/x86/pcengines-apuv2.c