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>
This commit is contained in:

committed by
David S. Miller

parent
128ced8f9d
commit
255a915431
@@ -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 */
|
||||
|
Reference in New Issue
Block a user