]> git.hungrycats.org Git - linux/commitdiff
[ARM] Make etherh.c build again - combine struct ei_device inside our
authorRussell King <rmk@flint.arm.linux.org.uk>
Thu, 23 May 2002 02:33:38 +0000 (03:33 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Thu, 23 May 2002 02:33:38 +0000 (03:33 +0100)
own device specific structure.

drivers/acorn/net/etherh.c

index 2e65de93988951b3f3444ca471da7d71898b9367..68e3d62fd3267a04b319559630421e8030c9e469 100644 (file)
@@ -66,6 +66,7 @@ static const card_ids __init etherh_cids[] = {
 };
 
 struct etherh_priv {
+       struct ei_device eidev;
        unsigned int    id;
        unsigned int    ctrl_port;
        unsigned int    ctrl;
@@ -150,8 +151,8 @@ static expansioncard_ops_t etherh_ops = {
 static void
 etherh_setif(struct net_device *dev)
 {
-       struct ei_device *ei_local = (struct ei_device *) dev->priv;
-       struct etherh_priv *eh = (struct etherh_priv *)dev->rmem_start;
+       struct etherh_priv *eh = (struct etherh_priv *)dev->priv;
+       struct ei_device *ei_local = &eh->eidev;
        unsigned long addr, flags;
 
        local_irq_save(flags);
@@ -194,8 +195,8 @@ etherh_setif(struct net_device *dev)
 static int
 etherh_getifstat(struct net_device *dev)
 {
-       struct ei_device *ei_local = (struct ei_device *) dev->priv;
-       struct etherh_priv *eh = (struct etherh_priv *)dev->rmem_start;
+       struct etherh_priv *eh = (struct etherh_priv *)dev->priv;
+       struct ei_device *ei_local = &eh->eidev;
        int stat = 0;
 
        switch (eh->id) {
@@ -560,6 +561,9 @@ static struct net_device * __init etherh_init_one(struct expansion_card *ec)
        if (!eh)
                goto out_nopriv;
 
+       memset(eh, 0, sizeof(struct etherh_priv));
+       spin_lock_init(&eh->eidev.page_lock);
+
        SET_MODULE_OWNER(dev);
 
        dev->open       = etherh_open;
@@ -567,7 +571,7 @@ static struct net_device * __init etherh_init_one(struct expansion_card *ec)
        dev->set_config = etherh_set_config;
        dev->irq        = ec->irq;
        dev->base_addr  = ecard_address(ec, ECARD_MEMC, 0);
-       dev->rmem_start = (unsigned long)eh;
+       dev->priv       = eh;
 
        /*
         * IRQ and control port handling