From patchwork Tue Dec 26 06:37:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 10132905 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 3FD0D60211 for ; Tue, 26 Dec 2017 06:39:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30E732E7AD for ; Tue, 26 Dec 2017 06:39:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 253162E7B3; Tue, 26 Dec 2017 06:39:39 +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 86DDA2E7AD for ; Tue, 26 Dec 2017 06:39:38 +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=J9DOtrA4O9ipQ3Bx7y1JsO4DWlwT7VQcOVTmj3drB6A=; b=Vx/GRi+x/9VO4ygkivEB2Y9HVh K8oSG4SeR0BIw9ShyfvUjcSdlv1tt+XXDNmLPSsavkdRJ1Woifqa2gBMJ9TIyZ/PB/ftAnZEdE9oo K93OxBoipy+A3vVUQ3xYLDFUMrb2iRp+59JeF43s33dixULKaR00Hl4mVTr7YdkHNMEE+W145SgAw Lvwfct+BqBEoD1GIT2VBolKx3SCU2Usz39oY20Wv7HsU88d82mp20d/NjZ4KJOxlw/KYJonRxLTCq C5+9HFAFpNCzNkubC5hvvdf0Yw3Nfk6iLV6C7n1ll28OQVcZj/kM2P1Kw34EtbmnSSIkGnr66flqm i0c8IxAw==; 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 1eTith-0001Tw-Ud; Tue, 26 Dec 2017 06:39:33 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eTisE-0000Xf-In for linux-arm-kernel@lists.infradead.org; Tue, 26 Dec 2017 06:38:14 +0000 Received: by mail-pf0-x241.google.com with SMTP id d23so18430872pfe.9 for ; Mon, 25 Dec 2017 22:37:51 -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=CbtyXSOINRrnxb7Xc74IhAUW6rgcnDZjl/uH5ZCH1pw=; b=YVJ61wH0c8Y69yL3n1TbCEb/TXFSDbWcgh+T3G8tZHjeC18LmU/yfUho/AICh2lgd3 mvlxf3vA9TngL2skdMLbyJ0pFfnYjk8PGLs6L8khiJrHhaUHQvP2prrm0o+bU4f6uQ8W t+d5GYsKa8NQInJwk0lvAm04AAqxxq27xhwa2A6zPdEmdXfOTlhJ/DskVCyd6X1g8uOy Ek16qnzb1/Lf4b+nRYskWv7PgZPzsWyuJTbJYbwvI7x+RaOFviggZirTqnuhuA9V4VFd ntQdi2b9kyNKCLcn8DTAHdy1a8PFCQ8RcR50Gdh8dVAhq2+Qvt7kf9diSXArVj8RmgY/ vDsA== 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=CbtyXSOINRrnxb7Xc74IhAUW6rgcnDZjl/uH5ZCH1pw=; b=Swi00LyD0ttv3sg3fAgRYDlUKhK7adqYjod8vlC4bTgcENknA5WRxeqeOMjwu5eZjI MkTcKoFjtcJhuYYPCLRdbHPPDr1iDshKaNgQH8QLMvRX07NJNGlV1ELY26FyXdcMSxQL eBx6CCDDSV/A0lFfaV/wpFDc9lD6z4UqmblW7eBvT7uKNjWS8bbHLby/asdXCS/FIRf0 bzNH21F0g0BFdHt/PaCdOsdxUBbsOxMh0jBfuMIZpuk5BFNmlMM6SbZSR9hEfAqKiCB0 oqp3Z82qn3fWSuTra+UVMhqe8UcR1gyGdN8919teJD/50PIGX++7QSLnSsMFc8zJtxVU c4Pw== X-Gm-Message-State: AKGB3mLMMV8T/+1mpxJCxT7WrIrhGpKJEHc6yANcmyq1wMefXgCo/awC evVxMLABth7RBJLgdR84Bd8= X-Google-Smtp-Source: ACJfBovUGSa47TSZrniE9ld4f/JQpJM9LaGPOJOv7cJITQQ1ZzMnLkFxMlBVguPNS0SiJngk5IRbSQ== X-Received: by 10.101.65.129 with SMTP id a1mr21568836pgq.203.1514270271315; Mon, 25 Dec 2017 22:37:51 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id r13sm61877584pfl.157.2017.12.25.22.37.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Dec 2017 22:37:50 -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 09/11 v2] ARM: orion5x: constify gpio_led Date: Tue, 26 Dec 2017 12:07:12 +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_223803_290633_2674220E X-CRM114-Status: GOOD ( 11.84 ) 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-orion5x/board-d2net.c | 2 +- arch/arm/mach-orion5x/dns323-setup.c | 2 +- arch/arm/mach-orion5x/ls_hgl-setup.c | 2 +- arch/arm/mach-orion5x/mv2120-setup.c | 2 +- arch/arm/mach-orion5x/net2big-setup.c | 2 +- arch/arm/mach-orion5x/rd88f5182-setup.c | 2 +- arch/arm/mach-orion5x/ts409-setup.c | 2 +- arch/arm/mach-orion5x/wrt350n-v2-setup.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-orion5x/board-d2net.c b/arch/arm/mach-orion5x/board-d2net.c index a89376a..55d6562 100644 --- a/arch/arm/mach-orion5x/board-d2net.c +++ b/arch/arm/mach-orion5x/board-d2net.c @@ -54,7 +54,7 @@ #define D2NET_GPIO_BLUE_LED_BLINK_CTRL 16 #define D2NET_GPIO_BLUE_LED_OFF 23 -static struct gpio_led d2net_leds[] = { +static const struct gpio_led d2net_leds[] = { { .name = "d2net:blue:sata", .default_trigger = "default-on", diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index cd483bf..6aeab1d 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c @@ -204,7 +204,7 @@ static int __init dns323_read_mac_addr(void) * GPIO LEDs (simple - doesn't use hardware blinking support) */ -static struct gpio_led dns323ab_leds[] = { +static const struct gpio_led dns323ab_leds[] = { { .name = "power:blue", .gpio = DNS323_GPIO_LED_POWER2, diff --git a/arch/arm/mach-orion5x/ls_hgl-setup.c b/arch/arm/mach-orion5x/ls_hgl-setup.c index 47ba6e0..c394281 100644 --- a/arch/arm/mach-orion5x/ls_hgl-setup.c +++ b/arch/arm/mach-orion5x/ls_hgl-setup.c @@ -86,7 +86,7 @@ static struct i2c_board_info __initdata ls_hgl_i2c_rtc = { #define LS_HGL_GPIO_LED_PWR 0 -static struct gpio_led ls_hgl_led_pins[] = { +static const struct gpio_led ls_hgl_led_pins[] = { { .name = "alarm:red", .gpio = LS_HGL_GPIO_LED_ALARM, diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c index 2bf8ec7..724c08a 100644 --- a/arch/arm/mach-orion5x/mv2120-setup.c +++ b/arch/arm/mach-orion5x/mv2120-setup.c @@ -136,7 +136,7 @@ static struct i2c_board_info __initdata mv2120_i2c_rtc = { .irq = 0, }; -static struct gpio_led mv2120_led_pins[] = { +static const struct gpio_led mv2120_led_pins[] = { { .name = "mv2120:blue:health", .gpio = 0, diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c index bf6be4c..7d59888 100644 --- a/arch/arm/mach-orion5x/net2big-setup.c +++ b/arch/arm/mach-orion5x/net2big-setup.c @@ -214,7 +214,7 @@ static void __init net2big_sata_power_init(void) #define NET2BIG_GPIO_SATA0_BLUE_LED 17 #define NET2BIG_GPIO_SATA1_BLUE_LED 13 -static struct gpio_led net2big_leds[] = { +static const struct gpio_led net2big_leds[] = { { .name = "net2big:red:power", .gpio = NET2BIG_GPIO_PWR_RED_LED, diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c index fe3e67c..e2f280d 100644 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c @@ -83,7 +83,7 @@ static struct platform_device rd88f5182_nor_flash = { #define RD88F5182_GPIO_LED 0 -static struct gpio_led rd88f5182_gpio_led_pins[] = { +static const struct gpio_led rd88f5182_gpio_led_pins[] = { { .name = "rd88f5182:cpu", .default_trigger = "cpu0", diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c index a77613b..a31f6848 100644 --- a/arch/arm/mach-orion5x/ts409-setup.c +++ b/arch/arm/mach-orion5x/ts409-setup.c @@ -169,7 +169,7 @@ static struct i2c_board_info __initdata qnap_ts409_i2c_rtc = { * LEDs attached to GPIO ****************************************************************************/ -static struct gpio_led ts409_led_pins[] = { +static const struct gpio_led ts409_led_pins[] = { { .name = "ts409:red:sata1", .gpio = 4, diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index 9250bb2..5493d73 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c @@ -29,7 +29,7 @@ /* * LEDs attached to GPIO */ -static struct gpio_led wrt350n_v2_led_pins[] = { +static const struct gpio_led wrt350n_v2_led_pins[] = { { .name = "wrt350nv2:green:power", .gpio = 0,