net/7990: Make lance_private.name const
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sat, 28 Dec 2013 20:11:15 +0000 (21:11 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 29 Dec 2013 05:46:38 +0000 (00:46 -0500)
This allows to drop a few casts.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/7990.h
drivers/net/ethernet/amd/hplance.c
drivers/net/ethernet/amd/mvme147.c

index 6cf566c3d2493ac3f3ceae9521397e6b636d36e0..e9e0be3138049d59f544d027cca11076cd8db3db 100644 (file)
@@ -98,7 +98,7 @@ struct lance_init_block {
  * drivers to add things...
  */
 struct lance_private {
-       char *name;
+       const char *name;
        unsigned long base;
        volatile struct lance_init_block *init_block; /* CPU address of RAM */
        volatile struct lance_init_block *lance_init_block; /* LANCE address of RAM */
index 88a81a18374d6346fb905b2d1213f822e33e63e9..47ce57c2c8939fd458decbb74042d8179b31c558 100644 (file)
@@ -149,7 +149,7 @@ static void hplance_init(struct net_device *dev, struct dio_dev *d)
        }
 
        lp = netdev_priv(dev);
-       lp->lance.name = (char *)d->name;                /* discards const, shut up gcc */
+       lp->lance.name = d->name;
        lp->lance.base = va;
        lp->lance.init_block = (struct lance_init_block *)(va + HPLANCE_MEMOFF); /* CPU addr */
        lp->lance.lance_init_block = NULL;              /* LANCE addr of same RAM */
index 15a5e366af299686048fbf531b9e713471a9cdbd..0e8399dec0543736d8dc3ef732cb18817eca7892 100644 (file)
@@ -118,7 +118,7 @@ struct net_device * __init mvme147lance_probe(int unit)
                return ERR_PTR(-ENOMEM);
        }
 
-       lp->lance.name = (char *)name;                   /* discards const, shut up gcc */
+       lp->lance.name = name;
        lp->lance.base = dev->base_addr;
        lp->lance.init_block = (struct lance_init_block *)(lp->ram); /* CPU addr */
        lp->lance.lance_init_block = (struct lance_init_block *)(lp->ram);                 /* LANCE addr of same RAM */