Commit 752e2bd2 authored by Russell King's avatar Russell King

[ARM] Make etherh.c build again - combine struct ei_device inside our

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