lkml.org 
[lkml]   [2006]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] -mm: constify parts of kernel/power/
    Hello all,

    patch run-tested on linux-2.6.17-rc4-mm3.

    Signed-off-by: Andreas Mohr <andi@lisas.de>


    diff -urN linux-2.6.17-rc4-mm3.orig/kernel/power/disk.c linux-2.6.17-rc4-mm3.my/kernel/power/disk.c
    --- linux-2.6.17-rc4-mm3.orig/kernel/power/disk.c 2006-05-23 19:14:17.000000000 +0200
    +++ linux-2.6.17-rc4-mm3/kernel/power/disk.c 2006-05-23 16:53:04.000000000 +0200
    @@ -214,7 +214,7 @@
    }


    -static char * pm_disk_modes[] = {
    +static const char * const pm_disk_modes[] = {
    [PM_DISK_FIRMWARE] = "firmware",
    [PM_DISK_PLATFORM] = "platform",
    [PM_DISK_SHUTDOWN] = "shutdown",
    diff -urN linux-2.6.17-rc4-mm3.orig/kernel/power/main.c linux-2.6.17-rc4-mm3.my/kernel/power/main.c
    --- linux-2.6.17-rc4-mm3.orig/kernel/power/main.c 2006-05-23 19:13:20.000000000 +0200
    +++ linux-2.6.17-rc4-mm3/kernel/power/main.c 2006-05-23 16:42:42.000000000 +0200
    @@ -143,7 +143,7 @@



    -static char *pm_states[PM_SUSPEND_MAX] = {
    +static const char * const pm_states[PM_SUSPEND_MAX] = {
    [PM_SUSPEND_STANDBY] = "standby",
    [PM_SUSPEND_MEM] = "mem",
    #ifdef CONFIG_SOFTWARE_SUSPEND
    @@ -260,7 +260,7 @@
    static ssize_t state_store(struct subsystem * subsys, const char * buf, size_t n)
    {
    suspend_state_t state = PM_SUSPEND_STANDBY;
    - char ** s;
    + const char * const * s;
    char *p;
    int error;
    int len;
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2006-05-23 20:57    [W:0.022 / U:59.932 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site