Commit 4cb79fb4 authored by Randy Dunlap's avatar Randy Dunlap Committed by Jeff Garzik

[PATCH] use netdev_priv() in fusion/mptlan

parent dd50d55d
...@@ -337,7 +337,7 @@ static int ...@@ -337,7 +337,7 @@ static int
mpt_lan_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) mpt_lan_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
{ {
struct net_device *dev = mpt_landev[ioc->id]; struct net_device *dev = mpt_landev[ioc->id];
struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv; struct mpt_lan_priv *priv = netdev_priv(dev);
dlprintk((KERN_INFO MYNAM ": IOC %s_reset routed to LAN driver!\n", dlprintk((KERN_INFO MYNAM ": IOC %s_reset routed to LAN driver!\n",
reset_phase==MPT_IOC_SETUP_RESET ? "setup" : ( reset_phase==MPT_IOC_SETUP_RESET ? "setup" : (
...@@ -409,7 +409,7 @@ mpt_lan_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) ...@@ -409,7 +409,7 @@ mpt_lan_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
static int static int
mpt_lan_open(struct net_device *dev) mpt_lan_open(struct net_device *dev)
{ {
struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv; struct mpt_lan_priv *priv = netdev_priv(dev);
int i; int i;
if (mpt_lan_reset(dev) != 0) { if (mpt_lan_reset(dev) != 0) {
...@@ -500,7 +500,7 @@ mpt_lan_reset(struct net_device *dev) ...@@ -500,7 +500,7 @@ mpt_lan_reset(struct net_device *dev)
{ {
MPT_FRAME_HDR *mf; MPT_FRAME_HDR *mf;
LANResetRequest_t *pResetReq; LANResetRequest_t *pResetReq;
struct mpt_lan_priv *priv = (struct mpt_lan_priv *)dev->priv; struct mpt_lan_priv *priv = netdev_priv(dev);
mf = mpt_get_msg_frame(LanCtx, priv->mpt_dev->id); mf = mpt_get_msg_frame(LanCtx, priv->mpt_dev->id);
...@@ -529,7 +529,7 @@ mpt_lan_reset(struct net_device *dev) ...@@ -529,7 +529,7 @@ mpt_lan_reset(struct net_device *dev)
static int static int
mpt_lan_close(struct net_device *dev) mpt_lan_close(struct net_device *dev)
{ {
struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv; struct mpt_lan_priv *priv = netdev_priv(dev);
MPT_ADAPTER *mpt_dev = priv->mpt_dev; MPT_ADAPTER *mpt_dev = priv->mpt_dev;
unsigned int timeout; unsigned int timeout;
int i; int i;
...@@ -590,7 +590,7 @@ mpt_lan_close(struct net_device *dev) ...@@ -590,7 +590,7 @@ mpt_lan_close(struct net_device *dev)
static struct net_device_stats * static struct net_device_stats *
mpt_lan_get_stats(struct net_device *dev) mpt_lan_get_stats(struct net_device *dev)
{ {
struct mpt_lan_priv *priv = (struct mpt_lan_priv *)dev->priv; struct mpt_lan_priv *priv = netdev_priv(dev);
return (struct net_device_stats *) &priv->stats; return (struct net_device_stats *) &priv->stats;
} }
...@@ -610,7 +610,7 @@ mpt_lan_change_mtu(struct net_device *dev, int new_mtu) ...@@ -610,7 +610,7 @@ mpt_lan_change_mtu(struct net_device *dev, int new_mtu)
static void static void
mpt_lan_tx_timeout(struct net_device *dev) mpt_lan_tx_timeout(struct net_device *dev)
{ {
struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv; struct mpt_lan_priv *priv = netdev_priv(dev);
MPT_ADAPTER *mpt_dev = priv->mpt_dev; MPT_ADAPTER *mpt_dev = priv->mpt_dev;
if (mpt_dev->active) { if (mpt_dev->active) {
...@@ -624,7 +624,7 @@ mpt_lan_tx_timeout(struct net_device *dev) ...@@ -624,7 +624,7 @@ mpt_lan_tx_timeout(struct net_device *dev)
static int static int
mpt_lan_send_turbo(struct net_device *dev, u32 tmsg) mpt_lan_send_turbo(struct net_device *dev, u32 tmsg)
{ {
struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv; struct mpt_lan_priv *priv = netdev_priv(dev);
MPT_ADAPTER *mpt_dev = priv->mpt_dev; MPT_ADAPTER *mpt_dev = priv->mpt_dev;
struct sk_buff *sent; struct sk_buff *sent;
unsigned long flags; unsigned long flags;
...@@ -657,7 +657,7 @@ mpt_lan_send_turbo(struct net_device *dev, u32 tmsg) ...@@ -657,7 +657,7 @@ mpt_lan_send_turbo(struct net_device *dev, u32 tmsg)
static int static int
mpt_lan_send_reply(struct net_device *dev, LANSendReply_t *pSendRep) mpt_lan_send_reply(struct net_device *dev, LANSendReply_t *pSendRep)
{ {
struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv; struct mpt_lan_priv *priv = netdev_priv(dev);
MPT_ADAPTER *mpt_dev = priv->mpt_dev; MPT_ADAPTER *mpt_dev = priv->mpt_dev;
struct sk_buff *sent; struct sk_buff *sent;
unsigned long flags; unsigned long flags;
...@@ -730,7 +730,7 @@ mpt_lan_send_reply(struct net_device *dev, LANSendReply_t *pSendRep) ...@@ -730,7 +730,7 @@ mpt_lan_send_reply(struct net_device *dev, LANSendReply_t *pSendRep)
static int static int
mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev) mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)
{ {
struct mpt_lan_priv *priv = (struct mpt_lan_priv *) dev->priv; struct mpt_lan_priv *priv = netdev_priv(dev);
MPT_ADAPTER *mpt_dev = priv->mpt_dev; MPT_ADAPTER *mpt_dev = priv->mpt_dev;
MPT_FRAME_HDR *mf; MPT_FRAME_HDR *mf;
LANSendRequest_t *pSendReq; LANSendRequest_t *pSendReq;
...@@ -1372,7 +1372,7 @@ mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum) ...@@ -1372,7 +1372,7 @@ mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum)
dev->mtu = MPT_LAN_MTU; dev->mtu = MPT_LAN_MTU;
priv = (struct mpt_lan_priv *) dev->priv; priv = netdev_priv(dev);
priv->mpt_dev = mpt_dev; priv->mpt_dev = mpt_dev;
priv->pnum = pnum; priv->pnum = pnum;
......
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