Commit d6380fc4 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Stephen Hemminger

[PATCH] m68k-related net driver fixes

On Sun, 16 Nov 2003, Jeff Garzik wrote:
> Yet more updates.  Syncing with Andrew Morton, and more syncing with Al
> Viro.
>
> No users of init_etherdev remain in the tree.  (yay!)

Here are some (untested, except for cross-gcc) fixes for the m68k-related
drivers:
  - Space.c: fix incorrect prototypes for atarilance_probe() and mace_probe()
  - a2065.c: kill superfluous argument of alloc_etherdev()
  - apne.c:
      o fix incorrect prototype for apne_probe()
      o kill unused variable err
  - mac8390.c:
      o kill unused variable probed
      o fix typos ENDOEV -> ENODEV and ERR_PTE -> ERR_PTR
      o add missing variable slots
  - macmace.c: use ERR_PTR() where needed
  - macsonic.c: kill unused variable lp
  - mvme147.c:
      o kill conversion warning and kill a cast by making ram unsigned long
      o add missing variable err

Note: The use of `slots' in mac8390.c is not in my tree. Do you know where that
change comes from?
parent 553585f3
...@@ -74,7 +74,7 @@ extern struct net_device *sonic_probe(int unit); ...@@ -74,7 +74,7 @@ extern struct net_device *sonic_probe(int unit);
extern struct net_device *SK_init(int unit); extern struct net_device *SK_init(int unit);
extern struct net_device *seeq8005_probe(int unit); extern struct net_device *seeq8005_probe(int unit);
extern struct net_device *smc_init(int unit); extern struct net_device *smc_init(int unit);
extern struct net_device *atarilance_probe(struct net_device *); extern struct net_device *atarilance_probe(int unit);
extern struct net_device *sun3lance_probe(int unit); extern struct net_device *sun3lance_probe(int unit);
extern struct net_device *sun3_82586_probe(int unit); extern struct net_device *sun3_82586_probe(int unit);
extern struct net_device *apne_probe(int unit); extern struct net_device *apne_probe(int unit);
...@@ -86,7 +86,7 @@ extern struct net_device *bagetlance_probe(int unit); ...@@ -86,7 +86,7 @@ extern struct net_device *bagetlance_probe(int unit);
extern struct net_device *mvme147lance_probe(int unit); extern struct net_device *mvme147lance_probe(int unit);
extern struct net_device *tc515_probe(int unit); extern struct net_device *tc515_probe(int unit);
extern struct net_device *lance_probe(int unit); extern struct net_device *lance_probe(int unit);
extern struct net_device *mace_probe(struct net_device *dev); extern struct net_device *mace_probe(int unit);
extern struct net_device *macsonic_probe(int unit); extern struct net_device *macsonic_probe(int unit);
extern struct net_device *mac8390_probe(int unit); extern struct net_device *mac8390_probe(int unit);
extern struct net_device *mac89x0_probe(int unit); extern struct net_device *mac89x0_probe(int unit);
......
...@@ -737,7 +737,7 @@ static int __init a2065_probe(void) ...@@ -737,7 +737,7 @@ static int __init a2065_probe(void)
continue; continue;
} }
dev = alloc_etherdev(0, sizeof(struct lance_private)); dev = alloc_etherdev(sizeof(struct lance_private));
if (dev == NULL) { if (dev == NULL) {
release_resource(r1); release_resource(r1);
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
#define NESM_STOP_PG 0x80 /* Last page +1 of RX ring */ #define NESM_STOP_PG 0x80 /* Last page +1 of RX ring */
int apne_probe(struct net_device *dev); struct net_device * __init apne_probe(int unit);
static int apne_probe1(struct net_device *dev, int ioaddr); static int apne_probe1(struct net_device *dev, int ioaddr);
static int apne_open(struct net_device *dev); static int apne_open(struct net_device *dev);
...@@ -572,8 +572,6 @@ static struct net_device *apne_dev; ...@@ -572,8 +572,6 @@ static struct net_device *apne_dev;
int init_module(void) int init_module(void)
{ {
int err;
apne_dev = apne_probe(-1); apne_dev = apne_probe(-1);
if (IS_ERR(apne_dev)) if (IS_ERR(apne_dev))
return PTR_ERR(apne_dev); return PTR_ERR(apne_dev);
......
...@@ -228,12 +228,12 @@ struct net_device * __init mac8390_probe(int unit) ...@@ -228,12 +228,12 @@ struct net_device * __init mac8390_probe(int unit)
volatile unsigned short *i; volatile unsigned short *i;
int version_disp = 0; int version_disp = 0;
struct nubus_dev * ndev = NULL; struct nubus_dev * ndev = NULL;
static int probed; int err = -ENODEV;
int err = -ENDOEV;
struct nubus_dir dir; struct nubus_dir dir;
struct nubus_dirent ent; struct nubus_dirent ent;
int offset; int offset;
static unsigned int slots;
enum mac8390_type cardtype; enum mac8390_type cardtype;
...@@ -379,7 +379,7 @@ struct net_device * __init mac8390_probe(int unit) ...@@ -379,7 +379,7 @@ struct net_device * __init mac8390_probe(int unit)
dev->priv = NULL; dev->priv = NULL;
out: out:
free_netdev(dev); free_netdev(dev);
return ERR_PTE(err); return ERR_PTR(err);
} }
#ifdef MODULE #ifdef MODULE
......
...@@ -229,7 +229,7 @@ struct net_device *mace_probe(int unit) ...@@ -229,7 +229,7 @@ struct net_device *mace_probe(int unit)
if (checksum != 0xFF) { if (checksum != 0xFF) {
free_netdev(dev); free_netdev(dev);
return -ENODEV; return ERR_PTR(-ENODEV);
} }
memset(&mp->stats, 0, sizeof(mp->stats)); memset(&mp->stats, 0, sizeof(mp->stats));
......
...@@ -495,7 +495,6 @@ int __init mac_nubus_sonic_probe(struct net_device* dev) ...@@ -495,7 +495,6 @@ int __init mac_nubus_sonic_probe(struct net_device* dev)
{ {
static int slots; static int slots;
struct nubus_dev* ndev = NULL; struct nubus_dev* ndev = NULL;
struct sonic_local* lp;
unsigned long base_addr, prom_addr; unsigned long base_addr, prom_addr;
u16 sonic_dcr; u16 sonic_dcr;
int id; int id;
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
struct m147lance_private { struct m147lance_private {
struct lance_private lance; struct lance_private lance;
void *base; void *base;
void *ram; unsigned long ram;
}; };
/* function prototypes... This is easy because all the grot is in the /* function prototypes... This is easy because all the grot is in the
...@@ -68,6 +68,7 @@ struct net_device * __init mvme147lance_probe(int unit) ...@@ -68,6 +68,7 @@ struct net_device * __init mvme147lance_probe(int unit)
struct m147lance_private *lp; struct m147lance_private *lp;
u_long *addr; u_long *addr;
u_long address; u_long address;
int err;
if (!MACH_IS_MVME147 || called) if (!MACH_IS_MVME147 || called)
return ERR_PTR(-ENODEV); return ERR_PTR(-ENODEV);
...@@ -112,7 +113,7 @@ struct net_device * __init mvme147lance_probe(int unit) ...@@ -112,7 +113,7 @@ struct net_device * __init mvme147lance_probe(int unit)
dev->dev_addr[5]); dev->dev_addr[5]);
lp = (struct m147lance_private *)dev->priv; lp = (struct m147lance_private *)dev->priv;
lp->ram = (void *)__get_dma_pages(GFP_ATOMIC, 3); /* 16K */ lp->ram = __get_dma_pages(GFP_ATOMIC, 3); /* 16K */
if (!lp->ram) if (!lp->ram)
{ {
printk("%s: No memory for LANCE buffers\n", dev->name); printk("%s: No memory for LANCE buffers\n", dev->name);
......
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