From patchwork Thu Apr 11 09:30:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10895483 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 5869014DB for ; Thu, 11 Apr 2019 09:31:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C0D328CBF for ; Thu, 11 Apr 2019 09:31:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 408B428CD0; Thu, 11 Apr 2019 09:31:05 +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 D0DC628CBF for ; Thu, 11 Apr 2019 09:31:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727025AbfDKJad (ORCPT ); Thu, 11 Apr 2019 05:30:33 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43792 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726981AbfDKJac (ORCPT ); Thu, 11 Apr 2019 05:30:32 -0400 Received: by mail-wr1-f68.google.com with SMTP id k17so1698702wrx.10 for ; Thu, 11 Apr 2019 02:30:31 -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=F2Wp4yv6asyb2BA6lvYd9DEU9QXvgg8ODxLuMyCJdkhul/PM6u0kx7a2L4X69Q6g5T qzXxrxHAD0vUNqXdrkcnWeM+oHmUycWMFIOdKAUZKDEPStSVWsaF1d3woBBUIYeuAKV/ dCfmplXj8/lNSFBEyEER/zDFpHh9YUcs3Oe1XjPKNoT4ehz37qenSfLmTbvcZkNT75x/ q/Rz1GmLIR3YVsQv1dwjZDIiFGrb9Myz1zkF5oeqQlBcD2njKx42CHUl/0xjGswlMBmA 1vWvO2J7hPawcvwxO7xlBTcBrcjHRpLE2djlIKEKebpAmSa0zSxvqVBF0nip/AbKDhGw wzsw== 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=NtNRnXKMWal/dKxTW3VnzEj8p4kS5GCrHrZilXHq/5sxYUiiZN3zxiJlNW9A8E5pip Llm44tF8XvI3Qs4rW9807PMa5F90b0CY0Cr/O0zaWcKhb+gjfDbuB6jzQPAwWUmXSSXE kQLe3lw2OkNjOJ+/W90p8j6WbYmvhN2HKZU6/A4f0KYpKveHEjolSrbMUcLJ6hl1C8gX Np4Z4TO/q10IAvcZdx75eNRY36RCc1eHlP+mcFwGIHcMNJNnd0I59QWSp2isC17qhKSr RfnpJJPDzqfiOv5vjHBcJpyV4qvIUifhF5Aj/NBvX9tL448ZzEvvkaTQ7LdApgBsx8eJ ebWQ== X-Gm-Message-State: APjAAAXTYxD22qC4Jbj34fAYi7zM3zpfFziE2fJfO3qc212VPecOCjoN CpHAr7JYuuxHXl77t4hnr8tUFw== X-Google-Smtp-Source: APXvYqzc/aNfb+Y/Bypvvo7Sn36VeXfGLTON3iEYLNkSDqwq6nsm+Rkfv/hwJdevkoX9lofmykaTPw== X-Received: by 2002:adf:f88c:: with SMTP id u12mr30025478wrp.235.1554975030331; Thu, 11 Apr 2019 02:30:30 -0700 (PDT) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id a9sm37517228wrt.29.2019.04.11.02.30.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 02:30:29 -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 v4 1/6] ARM: davinci: add missing sentinels to GPIO lookup tables Date: Thu, 11 Apr 2019 11:30:19 +0200 Message-Id: <20190411093024.23555-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190411093024.23555-1-brgl@bgdev.pl> References: <20190411093024.23555-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), + { } }, };