From patchwork Tue Dec 26 06:37:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 10132909 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 E09E360211 for ; Tue, 26 Dec 2017 06:40:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF1012D8AE for ; Tue, 26 Dec 2017 06:40:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C20392DBA3; Tue, 26 Dec 2017 06:40: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=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 0DD9B2D8AE for ; Tue, 26 Dec 2017 06:40: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=1Fw5h5XB8C5lVCnmDl6Zfwt+xmYRg/Wvs2/e2Vivyok=; b=eQCJfxLJ75/r1YuxY6bl3QP3yB hTydlCO1NYR0SsFSCmyB+zeKqO1r83T5gS47/tNVV0EHDzg83j3WLCXr2ZjBE1aIZGC7OHntzUcMB RvV+4/aUgqeQAvnS18SsDT0iXeElpQW3wJyPUbP0pwBBwzmvC43FpZfX1gxND+ZHeX5VLturGieRb U2ArZvZU9M2nObkMOF19bO2i/zWgLhIR5ZbmCUGd/Qwm0IVhFntAd7a39NdoP9vp/sVSwbmdtr5KD sfyAx0yjwTTBy6mSum9NtjS6gPbAclUPVTIpTWmcJn77UMrh2CaHhpQD9iGZflTHKITKhweWRgpuB QbTKU1cw==; 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 1eTiui-0002W3-RX; Tue, 26 Dec 2017 06:40:36 +0000 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eTisR-0000hr-M8 for linux-arm-kernel@lists.infradead.org; Tue, 26 Dec 2017 06:38:29 +0000 Received: by mail-pg0-x241.google.com with SMTP id f12so17497460pgo.5 for ; Mon, 25 Dec 2017 22:38:05 -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=gw1LgLswKOajO/vj4vZa4FQMbvQE67q3Qdy3k+z+opQ=; b=G18ALKcXmPgd4WBxyBzJll7zODpuOsjcODhez1pHDvQib7rO4WWtJRBCjQYnah/XUG Gl5mMZajxCXYd+TKmqETHcrNHeN8xy3MNmyIqMdLNVOWGKn0ZbSzcwNo7EoYONSQlqcU sMEztQqDFGhSQaQgTrhALXXoGMpAkCjc37CckskDA8kqx2dB4w7qHn/qVAE95J407B+i exMlQmOulmS2r9B9O2cRJWqpC/SQqTZEbH78rqgpP5eoetvqPEz1XCkMUYbGfTTaMjru +6p6uD06h666EEWdI4qcGju5GS3wQYsnMkeh7DZ3fjlNCNUb6PUyLgQqJo/4pKF8PhCW JsrQ== 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=gw1LgLswKOajO/vj4vZa4FQMbvQE67q3Qdy3k+z+opQ=; b=dqWWgpj7Q92RArWuyFFPXcbpAuHbxlDUNSg7F0xgu0PnAehmC/+xs34ie/1Jlk8Nw6 dqDOcXKmY3VVQvJTp+tD+2/L9B/ZUZt201vHS8NRJ8Uxco81oKJoZesVcWjooL6KkdYT ebOw7eUGIRnrMwCPQCb8SQM4A3wOCLjOg/gscMNV0GeUafsPtTLKYG3JAdcUN4CdPE8b +yariRyXjVKURntVgypqPJwm7T15ICJEVEBR35hqqY/b1qbe2k9IbCkf9VH+GlkhCC2e SAOaLDuoZ1LFapbWYD9u993KAJaW2bsYnc4m5TgTd8qHvi+EoGrEwAaO1jAKcHQ9tvL+ DMrg== X-Gm-Message-State: AKGB3mK8YErT62RzkHaug9386BBqWMS5kbIv1sYL0E/5ouu0TN/TPLqk EYvpXYt2w6wHoyH9RGVqyyc= X-Google-Smtp-Source: ACJfBos3YqWeee4ypS3BD3CpoTO8SD3PfDZvioAdJzdlxeI5UtBGkiJkJHrSS9hmc+T2W02WZ6k6zg== X-Received: by 10.101.87.143 with SMTP id b15mr11225008pgr.227.1514270284597; Mon, 25 Dec 2017 22:38:04 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id r13sm61877584pfl.157.2017.12.25.22.37.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Dec 2017 22:38:04 -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 11/11 v2] ARM: pxa: constify gpio_led Date: Tue, 26 Dec 2017 12:07:14 +0530 Message-Id: <19018a2025cdb6bd9994e534ed216790fe5e226e.1514267721.git.arvind.yadav.cs@gmail.com> 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_223816_231468_F823EF05 X-CRM114-Status: GOOD ( 12.55 ) 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'. Resolve auto build test ERROR. arch/arm/mach-pxa/balloon3.c | 4 ++-- arch/arm/mach-pxa/corgi.c | 2 +- arch/arm/mach-pxa/csb701.c | 2 +- arch/arm/mach-pxa/magician.c | 2 +- arch/arm/mach-pxa/mioa701.c | 2 +- arch/arm/mach-pxa/palmld.c | 2 +- arch/arm/mach-pxa/palmz72.c | 2 +- arch/arm/mach-pxa/pcm027.c | 2 +- arch/arm/mach-pxa/raumfeld.c | 4 ++-- arch/arm/mach-pxa/spitz.c | 2 +- arch/arm/mach-pxa/stargate2.c | 2 +- arch/arm/mach-pxa/tosa.c | 2 +- arch/arm/mach-pxa/trizeps4.c | 2 +- arch/arm/mach-pxa/zeus.c | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index d6d92f3..abcfb19 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c @@ -387,7 +387,7 @@ static unsigned long balloon3_led_pin_config[] __initdata = { GPIO10_GPIO, /* Heartbeat LED */ }; -struct gpio_led balloon3_gpio_leds[] = { +const struct gpio_led balloon3_gpio_leds[] = { { .name = "balloon3:green:idle", .default_trigger = "heartbeat", @@ -414,7 +414,7 @@ static struct platform_device balloon3_leds = { } }; -struct gpio_led balloon3_pcf_gpio_leds[] = { +const struct gpio_led balloon3_pcf_gpio_leds[] = { { .name = "balloon3:green:led0", .gpio = BALLOON3_PCF_GPIO_LED0, diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 7270f0db..6d6ded0 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c @@ -450,7 +450,7 @@ static struct platform_device corgi_gpio_keys_device = { /* * Corgi LEDs */ -static struct gpio_led corgi_gpio_leds[] = { +static const struct gpio_led corgi_gpio_leds[] = { { .name = "corgi:amber:charge", .default_trigger = "sharpsl-charge", diff --git a/arch/arm/mach-pxa/csb701.c b/arch/arm/mach-pxa/csb701.c index 527c9fd..b062b50 100644 --- a/arch/arm/mach-pxa/csb701.c +++ b/arch/arm/mach-pxa/csb701.c @@ -24,7 +24,7 @@ static struct gpio_keys_platform_data csb701_gpio_keys_data = { .nbuttons = ARRAY_SIZE(csb701_buttons), }; -static struct gpio_led csb701_leds[] = { +static const struct gpio_led csb701_leds[] = { { .name = "csb701:yellow:heartbeat", .default_trigger = "heartbeat", diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 7f3566c..505c9cc 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c @@ -424,7 +424,7 @@ static struct platform_device backlight = { * GPIO LEDs, Phone keys backlight, vibra */ -static struct gpio_led gpio_leds[] = { +static const struct gpio_led gpio_leds[] = { { .name = "magician::vibra", .default_trigger = "none", diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index 8a5d049..88115f0 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c @@ -274,7 +274,7 @@ static struct gpio_keys_platform_data mioa701_gpio_keys_data = { */ #define ONE_LED(_gpio, _name) \ { .gpio = (_gpio), .name = (_name), .active_low = true } -static struct gpio_led gpio_leds[] = { +static const struct gpio_led gpio_leds[] = { ONE_LED(GPIO10_LED_nCharging, "mioa701:charging"), ONE_LED(GPIO97_LED_nBlue, "mioa701:blue"), ONE_LED(GPIO98_LED_nOrange, "mioa701:orange"), diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c index 980f284..eb5992b 100644 --- a/arch/arm/mach-pxa/palmld.c +++ b/arch/arm/mach-pxa/palmld.c @@ -246,7 +246,7 @@ static inline void palmld_keys_init(void) {} * LEDs ******************************************************************************/ #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) -struct gpio_led gpio_leds[] = { +const struct gpio_led gpio_leds[] = { { .name = "palmld:green:led", .default_trigger = "none", diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c index 5877e54..99c5bf2 100644 --- a/arch/arm/mach-pxa/palmz72.c +++ b/arch/arm/mach-pxa/palmz72.c @@ -182,7 +182,7 @@ static inline void palmz72_kpc_init(void) {} * LEDs ******************************************************************************/ #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) -static struct gpio_led gpio_leds[] = { +static const struct gpio_led gpio_leds[] = { { .name = "palmz72:green:led", .default_trigger = "none", diff --git a/arch/arm/mach-pxa/pcm027.c b/arch/arm/mach-pxa/pcm027.c index ccca9f7..7dbea136 100644 --- a/arch/arm/mach-pxa/pcm027.c +++ b/arch/arm/mach-pxa/pcm027.c @@ -177,7 +177,7 @@ static struct platform_device pcm027_flash = { #ifdef CONFIG_LEDS_GPIO -static struct gpio_led pcm027_led[] = { +static const struct gpio_led pcm027_led[] = { { .name = "led0:red", /* FIXME */ .gpio = PCM027_LED_CPU diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 9d662fe..0d86dd6 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c @@ -468,7 +468,7 @@ static struct platform_device raumfeld_gpio_keys_device = { * GPIO LEDs */ -static struct gpio_led raumfeld_leds[] = { +static const struct gpio_led raumfeld_leds[] = { { .name = "raumfeld:1", .gpio = GPIO_LED1, @@ -558,7 +558,7 @@ static struct platform_device raumfeld_pwm_backlight_device = { }; /* LT3593 controlled backlight */ -static struct gpio_led raumfeld_lt3593_led = { +static const struct gpio_led raumfeld_lt3593_led = { .name = "backlight", .gpio = mfp_to_gpio(MFP_PIN_GPIO17), .default_state = LEDS_GPIO_DEFSTATE_ON, diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 67d66c7..f7a23f4 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -456,7 +456,7 @@ static inline void spitz_keys_init(void) {} * LEDs ******************************************************************************/ #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) -static struct gpio_led spitz_gpio_leds[] = { +static const struct gpio_led spitz_gpio_leds[] = { { .name = "spitz:amber:charge", .default_trigger = "sharpsl-charge", diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c index 6b7df6f..afa70f9 100644 --- a/arch/arm/mach-pxa/stargate2.c +++ b/arch/arm/mach-pxa/stargate2.c @@ -441,7 +441,7 @@ static struct pxamci_platform_data imote2_mci_platform_data = { .gpio_power = -1, }; -static struct gpio_led imote2_led_pins[] = { +static const struct gpio_led imote2_led_pins[] = { { .name = "imote2:red", .gpio = 103, diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 6a386fd..c551b76 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c @@ -548,7 +548,7 @@ static struct platform_device tosa_gpio_keys_device = { /* * Tosa LEDs */ -static struct gpio_led tosa_gpio_leds[] = { +static const struct gpio_led tosa_gpio_leds[] = { { .name = "tosa:amber:charge", .default_trigger = "main-battery-charging", diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 3dd13b4..a151c98 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c @@ -235,7 +235,7 @@ static struct platform_device dm9000_device = { /**************************************************************************** * LED's on GPIO pins of PXA ****************************************************************************/ -static struct gpio_led trizeps4_led[] = { +static const struct gpio_led trizeps4_led[] = { #ifdef STATUS_LEDS_ON_STUART_PINS { .name = "led0:orange:heartbeat", /* */ diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index ecbcaee..40e036d 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -438,7 +438,7 @@ static struct spi_board_info zeus_spi_board_info[] = { }; /* Leds */ -static struct gpio_led zeus_leds[] = { +static const struct gpio_led zeus_leds[] = { [0] = { .name = "zeus:yellow:1", .default_trigger = "heartbeat",