net: amd: constify zorro_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 22 Aug 2017 18:11:12 +0000 (23:41 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Aug 2017 21:35:36 +0000 (14:35 -0700)
zorro_device_id are not supposed to change at runtime. All functions
working with zorro_device_id provided by <linux/zorro.h> work with
const zorro_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/a2065.c
drivers/net/ethernet/amd/ariadne.c

index ee4b94e3cda906cd4ed4fa8dcfd8048a7c81ae52..e22f976a0d185886996a462465600670f9086dd3 100644 (file)
@@ -643,7 +643,7 @@ static int a2065_init_one(struct zorro_dev *z,
 static void a2065_remove_one(struct zorro_dev *z);
 
 
-static struct zorro_device_id a2065_zorro_tbl[] = {
+static const struct zorro_device_id a2065_zorro_tbl[] = {
        { ZORRO_PROD_CBM_A2065_1 },
        { ZORRO_PROD_CBM_A2065_2 },
        { ZORRO_PROD_AMERISTAR_A2065 },
index 5fd7b15b0574604e30d5827fc26397fc8603cce7..4b6a5cb85dd27ff8e8e62d64c35182e39331ad10 100644 (file)
@@ -692,7 +692,7 @@ static void ariadne_remove_one(struct zorro_dev *z)
        free_netdev(dev);
 }
 
-static struct zorro_device_id ariadne_zorro_tbl[] = {
+static const struct zorro_device_id ariadne_zorro_tbl[] = {
        { ZORRO_PROD_VILLAGE_TRONIC_ARIADNE },
        { 0 }
 };