]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ALSA: constify ct_timer_ops structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 9 Apr 2016 08:36:15 +0000 (10:36 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sat, 9 Apr 2016 08:58:04 +0000 (10:58 +0200)
The ct_timer_ops structures are never modified, so declare them as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ctxfi/cttimer.c

index a5d460453d7bbf1895bf7e0085675ec7e36b9d60..8f945341720bb594d54694bd5f99be855dcd339a 100644 (file)
@@ -49,7 +49,7 @@ struct ct_timer {
        spinlock_t lock;                /* global timer lock (for xfitimer) */
        spinlock_t list_lock;           /* lock for instance list */
        struct ct_atc *atc;
-       struct ct_timer_ops *ops;
+       const struct ct_timer_ops *ops;
        struct list_head instance_head;
        struct list_head running_head;
        unsigned int wc;                /* current wallclock */
@@ -128,7 +128,7 @@ static void ct_systimer_prepare(struct ct_timer_instance *ti)
 
 #define ct_systimer_free       ct_systimer_prepare
 
-static struct ct_timer_ops ct_systimer_ops = {
+static const struct ct_timer_ops ct_systimer_ops = {
        .init = ct_systimer_init,
        .free_instance = ct_systimer_free,
        .prepare = ct_systimer_prepare,
@@ -322,7 +322,7 @@ static void ct_xfitimer_free_global(struct ct_timer *atimer)
        ct_xfitimer_irq_stop(atimer);
 }
 
-static struct ct_timer_ops ct_xfitimer_ops = {
+static const struct ct_timer_ops ct_xfitimer_ops = {
        .prepare = ct_xfitimer_prepare,
        .start = ct_xfitimer_start,
        .stop = ct_xfitimer_stop,