Skip to content

Commit

Permalink
net/7990: Make lance_private.name const
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geert Uytterhoeven authored and David S. Miller committed Dec 29, 2013
1 parent a8ab77a commit 4ffa8fc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amd/7990.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amd/hplance.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amd/mvme147.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 4ffa8fc

Please sign in to comment.