lkml.org 
[lkml]   [2017]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 04/11] x86: geode: constify gpio_led
    Date
    gpio_led are not supposed to change at runtime.
    struct gpio_led_platform_data working with const gpio_led
    provided by <linux/leds.h>. So mark the non-const structs
    as const.

    Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
    ---
    arch/x86/platform/geode/alix.c | 2 +-
    arch/x86/platform/geode/geos.c | 2 +-
    arch/x86/platform/geode/net5501.c | 2 +-
    3 files changed, 3 insertions(+), 3 deletions(-)

    diff --git a/arch/x86/platform/geode/alix.c b/arch/x86/platform/geode/alix.c
    index 1865c19..9626367 100644
    --- a/arch/x86/platform/geode/alix.c
    +++ b/arch/x86/platform/geode/alix.c
    @@ -71,7 +71,7 @@
    }
    };

    -static struct gpio_led alix_leds[] = {
    +static const struct gpio_led alix_leds[] __initconst = {
    {
    .name = "alix:1",
    .gpio = 6,
    diff --git a/arch/x86/platform/geode/geos.c b/arch/x86/platform/geode/geos.c
    index 4fcdb91..119cfdc 100644
    --- a/arch/x86/platform/geode/geos.c
    +++ b/arch/x86/platform/geode/geos.c
    @@ -54,7 +54,7 @@
    }
    };

    -static struct gpio_led geos_leds[] = {
    +static const struct gpio_led geos_leds[] __initconst = {
    {
    .name = "geos:1",
    .gpio = 6,
    diff --git a/arch/x86/platform/geode/net5501.c b/arch/x86/platform/geode/net5501.c
    index a2f6b98..ba604cc 100644
    --- a/arch/x86/platform/geode/net5501.c
    +++ b/arch/x86/platform/geode/net5501.c
    @@ -57,7 +57,7 @@
    }
    };

    -static struct gpio_led net5501_leds[] = {
    +static const struct gpio_led net5501_leds[] __initconst = {
    {
    .name = "net5501:1",
    .gpio = 6,
    --
    1.9.1
    \
     
     \ /
      Last update: 2017-12-20 09:51    [W:2.774 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site