sparc: leon: grpci2: constify of_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Sat, 26 Aug 2017 11:28:34 +0000 (16:58 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Aug 2017 22:48:46 +0000 (15:48 -0700)
of_device_id are not supposed to change at runtime. All functions
working with of_device_id provided by <linux/of.h> work with const
of_device_ids. So mark the const and __initconst.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/leon_pci_grpci2.c

index f727c4de1316578505ed37aee52e39f9e9626ea5..ff0e5c90310fb1b287d3950e1148b1d8d9bd3ec3 100644 (file)
@@ -886,7 +886,7 @@ err1:
        return err;
 }
 
-static struct of_device_id grpci2_of_match[] = {
+static const struct of_device_id grpci2_of_match[] __initconst = {
        {
         .name = "GAISLER_GRPCI2",
         },