]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: gdm724x: constify tty_port_operations structs
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Mon, 14 Dec 2015 23:27:27 +0000 (01:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Dec 2015 01:13:33 +0000 (17:13 -0800)
Constifies tty_port_operations structure in
the tty code of the gdm724x driver since it
is not modified after its initialization.

Detected and found using Coccinelle.

Suggested-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm724x/gdm_tty.c

index e2c0f228f36937b87390c01672862e9935f785f6..eb7e2523c35455a90c354db7b6acbc1a80c9867b 100644 (file)
@@ -64,7 +64,7 @@ static void gdm_port_destruct(struct tty_port *port)
        kfree(gdm);
 }
 
-static struct tty_port_operations gdm_port_ops = {
+static const struct tty_port_operations gdm_port_ops = {
        .destruct = gdm_port_destruct,
 };