]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
parport: make parport_ip32_ops const and __initconst
authorBhumika Goyal <bhumirks@gmail.com>
Sun, 15 Oct 2017 21:04:23 +0000 (22:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Oct 2017 13:17:44 +0000 (15:17 +0200)
Make this const as it is only used during a copy operation. This usage
is inside init function and the structure is not referenced after
initialisation, so make it __initconst too.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/parport/parport_ip32.c

index 0186db7680d4f43137532382b549949effeef250..62873070f988e5d7e0307ea480436f3365408a1a 100644 (file)
@@ -1769,7 +1769,7 @@ stop:
 
 /*--- Default parport operations ---------------------------------------*/
 
-static __initdata struct parport_operations parport_ip32_ops = {
+static const struct parport_operations parport_ip32_ops __initconst = {
        .write_data             = parport_ip32_write_data,
        .read_data              = parport_ip32_read_data,