From patchwork Tue Dec 26 06:37:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 10132901 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 D2BF960211 for ; Tue, 26 Dec 2017 06:38:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3C672E7AA for ; Tue, 26 Dec 2017 06:38:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B84172E7AF; Tue, 26 Dec 2017 06:38:42 +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=ham 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 443D72E7AA for ; Tue, 26 Dec 2017 06:38:42 +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=Xn6RM9Qp0wBGTda4WoIzc3xLVluaKXPhAMOKpsk7Dkg=; b=Kz/6XBKyZ8QSC0jqVD8fj78Dz4 Xi6iIIoJHsK6gxA7mB6HFCc1YH48txgd30KMNjloa7hpq4R/SywnWwewEwsnj0hEv0vo8gFHLSsQx ghOYBw8Yy6CDW6MbDMSOMtLrGubz58tUUT5wRHkll4okWpkmNSswdahbXQkjAmvXf4XB1Gdr+USt0 KiF6nHAAKboh4nUsrB7bRp2kE+KJMp3aP3UE2m8CpFlGAwSGZxIHp/OMtDeE4jnseCisxtSsVnYla Cp44vcFEo77M1c59nALQwQ1kS9wOb9e8KnUuRel7Yvd3i5Z9z975Kdz83qRRWIIZaPxVJDn4JOxc2 NFnvx5lA==; 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 1eTisp-0000xf-FP; Tue, 26 Dec 2017 06:38:39 +0000 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eTis1-0000Sz-7n for linux-arm-kernel@lists.infradead.org; Tue, 26 Dec 2017 06:37:55 +0000 Received: by mail-pf0-x243.google.com with SMTP id l24so18440047pfj.6 for ; Mon, 25 Dec 2017 22:37:38 -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=BsAUHK+MqPlx40rRgo4rG6WU3E5ZQDWy6blelrNax4c=; b=sPBgmilgBTGTOAmFMNMXb4zDgHictq2591PTcVDFtfk6MxlAYtLDHMv87JR10/4aDn QyviIE7mVK0FtiRD8VKXvu+eFL60HkK5OHR/SUpqHaCz7XBQ0vSTphaDycsGhk/40rVd qbh84ugbjHevJ9uxH5LKjFG1tFmsJU6PQGmk2JrO+ckFCsQkledQ1rPWcE/fpL0ZeNoB J0rFNYEuK+mnMlkZLCllSOxbQ4N1icuvy2AcRY7hS6jPU2klNmCiLm+IZ5UnZjEAowpY knzNaLc9rJJRIkcqc/Ao2IWjClxnXKh5amPcP+zpbhsXrAFc2qRWPEduDkD99xbp5AXI 1j8g== 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=BsAUHK+MqPlx40rRgo4rG6WU3E5ZQDWy6blelrNax4c=; b=YDOgdjc/BikQaOf/6dxYo44p9X9CHhDSadpR3FGnCrI8W0tayTxbKY9bGjeKkFwLfU gARuSm2AcRuetkNzyCNpXwtiD+JPACdNsr8AIvBxtwyZ9N3qqdEgRWDU8Ug9eryPvnar P6QeX+ciuILf5uY4ogbxTR1CnTBCTaFcK4i9I90zjoyU0KYKSAlXBg5rkAqk7xO7jQ76 KLwUiLqilJRfztWxBghE5VjtuQvm0gt3FVpAF6kODgOIWXp6TkTgPE8tc+H/Gr1ACPUg 0KZwdnjd2xz94nUIr1QaR0RE4iZA+HjQ0EGN5OIJNkZPbi7+s5b/WTrO3pY1hJG5z4XS sk3g== X-Gm-Message-State: AKGB3mJEQ21nt0WxiEo1pYkKRgaoMgQRCeC0kKiE1farjjrKRBb8qtzL 6jomjnlTsk8b+zPIu2jqK3A= X-Google-Smtp-Source: ACJfBotAAcvj/h8TJA1gZfEBePZkDl/UnYmu0/BWbltcoyXDBFHsoibr7QrCTZ6whA7iA8ki7thKQg== X-Received: by 10.98.137.201 with SMTP id n70mr24127472pfk.93.1514270258172; Mon, 25 Dec 2017 22:37:38 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id r13sm61877584pfl.157.2017.12.25.22.37.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Dec 2017 22:37:36 -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 07/11 v2] ARM: ixp4xx: constify gpio_led Date: Tue, 26 Dec 2017 12:07:10 +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_223749_692487_5114F0DA X-CRM114-Status: GOOD ( 10.83 ) 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 --- 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-ixp4xx/dsmg600-setup.c | 2 +- arch/arm/mach-ixp4xx/nas100d-setup.c | 2 +- arch/arm/mach-ixp4xx/omixp-setup.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c index 0f5c999..77d894d 100644 --- a/arch/arm/mach-ixp4xx/dsmg600-setup.c +++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c @@ -93,7 +93,7 @@ static struct i2c_board_info __initdata dsmg600_i2c_board_info [] = { }, }; -static struct gpio_led dsmg600_led_pins[] = { +static const struct gpio_led dsmg600_led_pins[] = { { .name = "dsmg600:green:power", .gpio = DSMG600_LED_PWR_GPIO, diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c index 76dfff0..8d6bab9 100644 --- a/arch/arm/mach-ixp4xx/nas100d-setup.c +++ b/arch/arm/mach-ixp4xx/nas100d-setup.c @@ -72,7 +72,7 @@ static struct i2c_board_info __initdata nas100d_i2c_board_info [] = { }, }; -static struct gpio_led nas100d_led_pins[] = { +static const struct gpio_led nas100d_led_pins[] = { { .name = "nas100d:green:wlan", .gpio = NAS100D_LED_WLAN_GPIO, diff --git a/arch/arm/mach-ixp4xx/omixp-setup.c b/arch/arm/mach-ixp4xx/omixp-setup.c index 2d494b4..42c83a6 100644 --- a/arch/arm/mach-ixp4xx/omixp-setup.c +++ b/arch/arm/mach-ixp4xx/omixp-setup.c @@ -152,7 +152,7 @@ static struct platform_device omixp_uart = { .resource = omixp_uart_resources, }; -static struct gpio_led mic256_led_pins[] = { +static const struct gpio_led mic256_led_pins[] = { { .name = "LED-A", .gpio = 7,