]> git.baikalelectronics.ru Git - 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)
committerHans de Goede <hdegoede@redhat.com>
Fri, 6 Aug 2021 12:04:43 +0000 (14:04 +0200)
commitc120d66cf994dfe5ec1f4550b983e59df0d861f8
tree70701aba768d616a854fc502452a214b5f9e6f77
parenta0f4f47732acdc234fc51eebcca279e92c31360e
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: 2a79cc6efa8e ("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
drivers/platform/x86/pcengines-apuv2.c