From patchwork Fri Apr 12 12:36:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10898151 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C7FF9922 for ; Fri, 12 Apr 2019 12:37:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA9D728D12 for ; Fri, 12 Apr 2019 12:37:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C52028D1B; Fri, 12 Apr 2019 12:37:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3739B28D12 for ; Fri, 12 Apr 2019 12:37:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728428AbfDLMgs (ORCPT ); Fri, 12 Apr 2019 08:36:48 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:33581 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727529AbfDLMgq (ORCPT ); Fri, 12 Apr 2019 08:36:46 -0400 Received: by mail-wm1-f67.google.com with SMTP id z6so378200wmi.0 for ; Fri, 12 Apr 2019 05:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=45dzSBv6+V3bbvrapzfFB+qo0X2yeBTBy+CINkubKnc=; b=w4GD472KWldp0hHPg/Ps3G2W0jAvjWrj8BsmHNXWZg1xxBXbkfvw6xjfIUurXJ0nEj Q5PYxpgBwOPARJ2B/iOqLjbIfL6CvLFovFvge6SqXCeOISseeXxoejNluTO4E90ViDPF psx1VNo+s7x6nt+rXC7R/GbKIlQ09CCr6nTyY5CIGRbCO6w4Dqu6e3BvPUHuJXKhOuiu cBAEBtjO9NQEUqnDdSmEGXdBnsd+b2oyrdqojVGjZD4XALlwgOS2rGak2AFRyDrYui8x +Tz3h9dDL8LLc4ZCL+JnTx2d3k7R+f/ePhzGN4buShs4pF7091uMECgGujONpSsh0iRT fxlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=45dzSBv6+V3bbvrapzfFB+qo0X2yeBTBy+CINkubKnc=; b=V6g2Q6VPMq0iWHFYX3DM5Sn2tuvBMwwWOPaqpJ/uYvtIe9WrgT51eOXkciRO+CbVO5 LCFhTRQ8YyRy9ly6DgVF1YR1TBDbYK8/490PuPX/nTkHzlihJsJ8anN6s1LFarAaS14l xOdMAOxsG2bfe4jVXC8679QdQXeNsjvMGs0yFEqvEfjCybXO2Q/zhgtqrDJxclxekPUa VMXwCZwedb9/QM/KPa/Ds6wA9fg8Zo7RYH3shm8wCnEd3LeMU79n72/VJ9OBY+ag7jKV sq905WqxhcccGR6d5RXg5YTLM9yEGT/DHMPUUPodTKG9tKjwn5wKOpOxER8CCVw4tgIw Hdnw== X-Gm-Message-State: APjAAAUImv7m+7KnkvlftW7jOSqPsWrUXzUCmbZVxfMzZNrO5tGLYZWm M52gRy8dicRUXHvXWN1s0oU95Q== X-Google-Smtp-Source: APXvYqxX06KYCK4XB+Q+dqBWHaGwF6Mn33wY15Ntow3Vhc7yA950/dHiUaR1ywcqfgBGH5OLJHhEWw== X-Received: by 2002:a1c:e904:: with SMTP id q4mr10822003wmc.43.1555072604648; Fri, 12 Apr 2019 05:36:44 -0700 (PDT) Received: from localhost.localdomain (aputeaux-684-1-35-248.w90-86.abo.wanadoo.fr. [90.86.90.248]) by smtp.gmail.com with ESMTPSA id v190sm12384030wme.18.2019.04.12.05.36.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2019 05:36:44 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Alan Stern , Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v5 1/6] ARM: davinci: add missing sentinels to GPIO lookup tables Date: Fri, 12 Apr 2019 14:36:35 +0200 Message-Id: <20190412123640.11437-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190412123640.11437-1-brgl@bgdev.pl> References: <20190412123640.11437-1-brgl@bgdev.pl> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bartosz Golaszewski 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 --- arch/arm/mach-davinci/board-da830-evm.c | 2 ++ arch/arm/mach-davinci/board-da850-evm.c | 1 + arch/arm/mach-davinci/board-dm355-evm.c | 1 + arch/arm/mach-davinci/board-dm644x-evm.c | 1 + arch/arm/mach-davinci/board-omapl138-hawk.c | 1 + 5 files changed, 6 insertions(+) diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index ff097ecfa451..e3d74e43c47d 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -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), + { } }, }; diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 1fdc9283a8c5..4ee65a8a3b80 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -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), + { } }, }; diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index 64d81fc86f14..5113273fda69 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c @@ -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), + { } }, }; diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index de15f782816e..9d87d4e440ea 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -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), + { } }, }; diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index 0896af2bed24..e244c8648594 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c @@ -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), + { } }, };