path: root/drivers/net/can/sja1000/sja1000.h
diff options
authorWolfgang Grandegger <wg@grandegger.com>2009-05-30 07:55:49 +0000
committerDavid S. Miller <davem@davemloft.net>2009-06-01 02:53:34 -0700
commit255a9154319d3cf475d527458037758935f6445b (patch)
tree317fd2edb63cfa222000cbfa4c4bed6da15c5420 /drivers/net/can/sja1000/sja1000.h
parent128ced8f9d59bb3e36fbb4df87bd9d881f0a4463 (diff)
can: sja1000: stop misusing member base_addr of struct net_device
As discussed on the netdev mailing list, the member "base_addr" of "struct net_device" should not be (mis)used to store the virtual address to the SJA1000 register area. According to David Miller, it's only use is to allow ISA and similar primitive bus devices to have their I/O ports changed via ifconfig. The virtual address is now stored in the private data structure of the SJA1000 device and the callback functions use "struct sja1000_priv" instead of the unneeded "struct net_device". Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/can/sja1000/sja1000.h')
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/can/sja1000/sja1000.h b/drivers/net/can/sja1000/sja1000.h
index ccd30288796..302d2c763ad 100644
--- a/drivers/net/can/sja1000/sja1000.h
+++ b/drivers/net/can/sja1000/sja1000.h
@@ -155,14 +155,15 @@ struct sja1000_priv {
struct sk_buff *echo_skb;
/* the lower-layer is responsible for appropriate locking */
- u8 (*read_reg) (const struct net_device *dev, int reg);
- void (*write_reg) (const struct net_device *dev, int reg, u8 val);
- void (*pre_irq) (const struct net_device *dev);
- void (*post_irq) (const struct net_device *dev);
+ u8 (*read_reg) (const struct sja1000_priv *priv, int reg);
+ void (*write_reg) (const struct sja1000_priv *priv, int reg, u8 val);
+ void (*pre_irq) (const struct sja1000_priv *priv);
+ void (*post_irq) (const struct sja1000_priv *priv);
void *priv; /* for board-specific data */
struct net_device *dev;
+ void __iomem *reg_base; /* ioremap'ed address to registers */
unsigned long irq_flags; /* for request_irq() */
u16 flags; /* custom mode flags */