aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/sja1000/sja1000.h
diff options
context:
space:
mode:
authorWolfgang Grandegger <wg@grandegger.com>2009-05-30 03:55:49 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-01 05:53:34 -0400
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')
-rw-r--r--drivers/net/can/sja1000/sja1000.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/can/sja1000/sja1000.h b/drivers/net/can/sja1000/sja1000.h
index ccd302887964..302d2c763ad7 100644
--- a/drivers/net/can/sja1000/sja1000.h
+++ b/drivers/net/can/sja1000/sja1000.h
@@ -155,14 +155,15 @@ struct sja1000_priv {
155 struct sk_buff *echo_skb; 155 struct sk_buff *echo_skb;
156 156
157 /* the lower-layer is responsible for appropriate locking */ 157 /* the lower-layer is responsible for appropriate locking */
158 u8 (*read_reg) (const struct net_device *dev, int reg); 158 u8 (*read_reg) (const struct sja1000_priv *priv, int reg);
159 void (*write_reg) (const struct net_device *dev, int reg, u8 val); 159 void (*write_reg) (const struct sja1000_priv *priv, int reg, u8 val);
160 void (*pre_irq) (const struct net_device *dev); 160 void (*pre_irq) (const struct sja1000_priv *priv);
161 void (*post_irq) (const struct net_device *dev); 161 void (*post_irq) (const struct sja1000_priv *priv);
162 162
163 void *priv; /* for board-specific data */ 163 void *priv; /* for board-specific data */
164 struct net_device *dev; 164 struct net_device *dev;
165 165
166 void __iomem *reg_base; /* ioremap'ed address to registers */
166 unsigned long irq_flags; /* for request_irq() */ 167 unsigned long irq_flags; /* for request_irq() */
167 168
168 u16 flags; /* custom mode flags */ 169 u16 flags; /* custom mode flags */