From patchwork Tue Dec 26 06:37:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 10132903 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C08160211 for ; Tue, 26 Dec 2017 06:39:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CD592E7AA for ; Tue, 26 Dec 2017 06:39:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 518B02E7AF; Tue, 26 Dec 2017 06:39: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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 064862E7AA for ; Tue, 26 Dec 2017 06:39:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BuxfWQox2amwQIzfezPC0t4/d9XAj3o8Kcy6UygVI6E=; b=LA9gcs9ZHFpimtU5AcktWUgAlD Ohb1B69AA40OgeN/tldLblzFUryeFboJIM5JNYmmlXl6sVgmgMAXKOmkPoCrCzCeUo5Ss59Pnl/So gniztAiBcRG+UcZ7ZPsa0up3QVempU75pYVi2xaKK2+enT+fINR/6n+EmFP0z69ikECqPOxuDEpR+ Ebdw26ffleySnmAJUUOndOPibBqfzcEZet/Q7bkhPErBlOW1xUfOpNj60GkDQvhRZaiYARXCDuMSJ ICRaiq3/g6pORvkHAyqPPXCUxrATWEZjUO+ZYeqKpVAGCNQDD3KGMsC+A6Z9+lkXxGqpAw23YLvGO xV3LJRXg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eTitG-0001Ce-JO; Tue, 26 Dec 2017 06:39:06 +0000 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eTis8-0000UO-Pv for linux-arm-kernel@lists.infradead.org; Tue, 26 Dec 2017 06:38:07 +0000 Received: by mail-pg0-x243.google.com with SMTP id q67so8272036pga.9 for ; Mon, 25 Dec 2017 22:37:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=+2tkNccvJJiCx0BsZ/3TqNmxM5Nn25vV2GhQI/lKeQ4=; b=KQuUj6kFBmlviccALE5MMzk+nxXVURdu1EcvR1NnuR+mu/oKzp1igEpRnDeDdq3zx1 mTVZ7IqzzsxB2KaZhsLJkHYsaSq4WS2MmcsCZgIfiijb7ZMbzay0N8EURBdi1LrjHuNz HhahHiv6N0DdH1nlhDHq6snasBHUJh7nI5qHJ3P69sm97584rUVF3YMIrLN4xprKZ2Ql VfH0hj3a5NO42oMMP+t/0d5HxS+edpX4lPK7h14UM2eu8SycyLNFfEc5pJcUlcciGO/2 TqY4crM4VWt87a5LnWGb90FuRP/SxpJMSO6iWJAxoiNxnfD4fqnwOj6mTcyOY6cDkULK cm1Q== 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:in-reply-to:references; bh=+2tkNccvJJiCx0BsZ/3TqNmxM5Nn25vV2GhQI/lKeQ4=; b=V60t/tBPBQ5b+yglvZv21Yo0fCV00nvzAMCa3BtSxN+uwBg+KFYVhHJ0UWRorb4FyP oX4Iiqt3ikjgGagqmgN5i3gumOT25yLH0yTNktV/8gkbxmaN2KV2FhkkryeTStAm9SHe MGuVy9W4o41iVgnGCyg2/IKZj6gnSvvJ7q4xj0qD9FwPR0iFNYURN58h1NchlzZsFp0t YqCBV1LNtfE+63iyAeNY8W0XP5VEVz0VQj8Hnq1p7nFFl84RJchQmNKnB5aIAEpa8Pj6 JHTUCi50YX1x+pJQXxIhtZQhiQ/6tJ2EL8NF1z9B6Qh/QdNcKyHbYh3GQWp7tIuQKWP4 3KFQ== X-Gm-Message-State: AKGB3mLR+fsA1rfYPgqeWBFwzBxoYrVWnoJi7GMmdWuZHfFxenQXrLo6 nM0XvkkL+p32WHCXF1Dq7oE= X-Google-Smtp-Source: ACJfBouRjXXY3qEtf5fS6azOADqXi9aOXImC3ovX5yDRWj5rAzIv+6N89T6Kfz5wbyzUR5R/QvW1/A== X-Received: by 10.98.14.15 with SMTP id w15mr24448621pfi.222.1514270264816; Mon, 25 Dec 2017 22:37:44 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id r13sm61877584pfl.157.2017.12.25.22.37.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Dec 2017 22:37:44 -0800 (PST) From: Arvind Yadav To: nsekhar@ti.com, khilman@kernel.org, linux@armlinux.org.uk, kaloz@openwrt.org, khalasa@piap.pl, aaro.koskinen@iki.fi, tony@atomide.com, jason@lakedaemon.net, andrew@lunn.ch, sebastian.hesselbarth@gmail.com, gregory.clement@free-electrons.com, daniel@zonque.org, haojian.zhuang@gmail.com, marek.vasut@gmail.com, slapin@ossfans.org, jic23@cam.ac.uk, kgene@kernel.org, krzk@kernel.org, ralf@linux-mips.org, ysato@users.sourceforge.jp, dalias@libc.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com Subject: [PATCH 08/11 v2] ARM: OMAP1: constify gpio_led Date: Tue, 26 Dec 2017 12:07:11 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: <2b8dd58f9d6dae7f0fa04694e8147524be9300ea.1514267721.git.arvind.yadav.cs@gmail.com> References: <2b8dd58f9d6dae7f0fa04694e8147524be9300ea.1514267721.git.arvind.yadav.cs@gmail.com> In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171225_223757_483121_F7FCD658 X-CRM114-Status: GOOD ( 11.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP gpio_led are not supposed to change at runtime. struct gpio_led_platform_data working with const gpio_led provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav Acked-by: Aaro Koskinen --- changes in v2: The GPIO LED driver can be built as a module, it can be loaded after the init sections have gone away. So removed '__initconst'. arch/arm/mach-omap1/board-h2.c | 2 +- arch/arm/mach-omap1/board-h3.c | 2 +- arch/arm/mach-omap1/board-htcherald.c | 2 +- arch/arm/mach-omap1/board-osk.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index ab51f85..9aeb8ad 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c @@ -274,7 +274,7 @@ static struct platform_device h2_kp_device = { .resource = h2_kp_resources, }; -static struct gpio_led h2_gpio_led_pins[] = { +static const struct gpio_led h2_gpio_led_pins[] = { { .name = "h2:red", .default_trigger = "heartbeat", diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index ad339f5..2edcd63 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -326,7 +326,7 @@ static struct spi_board_info h3_spi_board_info[] __initdata = { }, }; -static struct gpio_led h3_gpio_led_pins[] = { +static const struct gpio_led h3_gpio_led_pins[] = { { .name = "h3:red", .default_trigger = "heartbeat", diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index 67d4669..e6a79fd 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c @@ -292,7 +292,7 @@ static struct platform_device herald_gpiokeys_device = { }; /* LEDs for the Herald. These connect to the HTCPLD GPIO device. */ -static struct gpio_led gpio_leds[] = { +static const struct gpio_led gpio_leds[] = { {"dpad", NULL, HTCPLD_GPIO_LED_DPAD, 0, 0, LEDS_GPIO_DEFSTATE_OFF}, {"kbd", NULL, HTCPLD_GPIO_LED_KBD, 0, 0, LEDS_GPIO_DEFSTATE_OFF}, {"vibrate", NULL, HTCPLD_GPIO_LED_VIBRATE, 0, 0, LEDS_GPIO_DEFSTATE_OFF}, diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index c66372e..e2277b5 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -167,7 +167,7 @@ static struct platform_device *osk5912_devices[] __initdata = { &osk5912_cf_device, }; -static struct gpio_led tps_leds[] = { +static const struct gpio_led tps_leds[] = { /* NOTE: D9 and D2 have hardware blink support. * Also, D9 requires non-battery power. */ @@ -385,7 +385,7 @@ static struct platform_device osk5912_lcd_device = { .id = -1, }; -static struct gpio_led mistral_gpio_led_pins[] = { +static const struct gpio_led mistral_gpio_led_pins[] = { { .name = "mistral:red", .default_trigger = "heartbeat",