ARM: davinci: add missing sentinels to GPIO lookup tables
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 12 Apr 2019 12:36:35 +0000 (14:36 +0200)
committerSekhar Nori <nsekhar@ti.com>
Fri, 12 Apr 2019 14:13:54 +0000 (19:43 +0530)
Some GPIO lookup tables defined in davinci board files are missing
array sentinels. If an entry for given device cannot be found, this
will cause a kernel panic.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arch/arm/mach-davinci/board-da830-evm.c
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-davinci/board-dm355-evm.c
arch/arm/mach-davinci/board-dm644x-evm.c
arch/arm/mach-davinci/board-omapl138-hawk.c

index ff097ecfa451e24ab4912c0f4de0cf2fd7baad69..e3d74e43c47d2244660984b3495977abb7cadae4 100644 (file)
@@ -58,6 +58,7 @@ static struct gpiod_lookup_table da830_evm_usb_gpio_lookup = {
        .table = {
                GPIO_LOOKUP("davinci_gpio", ON_BD_USB_DRV, "vbus", 0),
                GPIO_LOOKUP("davinci_gpio", ON_BD_USB_OVC, "oc", 0),
+               { }
        },
 };
 
@@ -156,6 +157,7 @@ static struct gpiod_lookup_table mmc_gpios_table = {
                            GPIO_ACTIVE_LOW),
                GPIO_LOOKUP("davinci_gpio", DA830_MMCSD_WP_PIN, "wp",
                            GPIO_ACTIVE_LOW),
+               { }
        },
 };
 
index 1fdc9283a8c50f5b458c94b26f84eb202ed7dc32..4ee65a8a3b8035483f98e335cda7c12c54854bbf 100644 (file)
@@ -784,6 +784,7 @@ static struct gpiod_lookup_table mmc_gpios_table = {
                            GPIO_ACTIVE_LOW),
                GPIO_LOOKUP("davinci_gpio", DA850_MMCSD_WP_PIN, "wp",
                            GPIO_ACTIVE_HIGH),
+               { }
        },
 };
 
index 64d81fc86f14f67cf53fd883d64e8ae97b600d71..5113273fda6916c04b5c31d1143444a31f64c9bf 100644 (file)
@@ -121,6 +121,7 @@ static struct gpiod_lookup_table i2c_recovery_gpiod_table = {
                            GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
                GPIO_LOOKUP("davinci_gpio", DM355_I2C_SCL_PIN, "scl",
                            GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
+               { }
        },
 };
 
index de15f782816e25e3ea7b71ba9f0a09540a46296e..9d87d4e440eaa4a7f552cd6c55ae71989c5a3ca7 100644 (file)
@@ -663,6 +663,7 @@ static struct gpiod_lookup_table i2c_recovery_gpiod_table = {
                            GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
                GPIO_LOOKUP("davinci_gpio", DM644X_I2C_SCL_PIN, "scl",
                            GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
+               { }
        },
 };
 
index 0896af2bed24206a5b65b5e9aa76cf6029d7c7f9..e244c8648594c65165657172a945b60a2025863a 100644 (file)
@@ -303,6 +303,7 @@ static struct gpiod_lookup_table hawk_usb_gpio_lookup = {
        .table = {
                GPIO_LOOKUP("davinci_gpio", DA850_USB1_VBUS_PIN, "vbus", 0),
                GPIO_LOOKUP("davinci_gpio", DA850_USB1_OC_PIN, "oc", 0),
+               { }
        },
 };