Commit 4ffa8fcd authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by David S. Miller

net/7990: Make lance_private.name const

This allows to drop a few casts.
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a8ab77a8
...@@ -98,7 +98,7 @@ struct lance_init_block { ...@@ -98,7 +98,7 @@ struct lance_init_block {
* drivers to add things... * drivers to add things...
*/ */
struct lance_private { struct lance_private {
char *name; const char *name;
unsigned long base; unsigned long base;
volatile struct lance_init_block *init_block; /* CPU address of RAM */ volatile struct lance_init_block *init_block; /* CPU address of RAM */
volatile struct lance_init_block *lance_init_block; /* LANCE address of RAM */ volatile struct lance_init_block *lance_init_block; /* LANCE address of RAM */
......
...@@ -149,7 +149,7 @@ static void hplance_init(struct net_device *dev, struct dio_dev *d) ...@@ -149,7 +149,7 @@ static void hplance_init(struct net_device *dev, struct dio_dev *d)
} }
lp = netdev_priv(dev); 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.base = va;
lp->lance.init_block = (struct lance_init_block *)(va + HPLANCE_MEMOFF); /* CPU addr */ lp->lance.init_block = (struct lance_init_block *)(va + HPLANCE_MEMOFF); /* CPU addr */
lp->lance.lance_init_block = NULL; /* LANCE addr of same RAM */ lp->lance.lance_init_block = NULL; /* LANCE addr of same RAM */
......
...@@ -118,7 +118,7 @@ struct net_device * __init mvme147lance_probe(int unit) ...@@ -118,7 +118,7 @@ struct net_device * __init mvme147lance_probe(int unit)
return ERR_PTR(-ENOMEM); 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.base = dev->base_addr;
lp->lance.init_block = (struct lance_init_block *)(lp->ram); /* CPU 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 */ lp->lance.lance_init_block = (struct lance_init_block *)(lp->ram); /* LANCE addr of same RAM */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment