mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
mptlan: Kill directly reference of netdev->priv
Simply replace netdev->priv with netdev_priv(). Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0eade1f930
commit
97341249c4
@ -815,7 +815,7 @@ mpt_lan_wake_post_buckets_task(struct net_device *dev, int priority)
|
|||||||
* @priority: 0 = put it on the timer queue, 1 = put it on the immediate queue
|
* @priority: 0 = put it on the timer queue, 1 = put it on the immediate queue
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
struct mpt_lan_priv *priv = dev->priv;
|
struct mpt_lan_priv *priv = netdev_priv(dev);
|
||||||
|
|
||||||
if (test_and_set_bit(0, &priv->post_buckets_active) == 0) {
|
if (test_and_set_bit(0, &priv->post_buckets_active) == 0) {
|
||||||
if (priority) {
|
if (priority) {
|
||||||
@ -834,7 +834,7 @@ mpt_lan_wake_post_buckets_task(struct net_device *dev, int priority)
|
|||||||
static int
|
static int
|
||||||
mpt_lan_receive_skb(struct net_device *dev, struct sk_buff *skb)
|
mpt_lan_receive_skb(struct net_device *dev, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
struct mpt_lan_priv *priv = dev->priv;
|
struct mpt_lan_priv *priv = netdev_priv(dev);
|
||||||
|
|
||||||
skb->protocol = mpt_lan_type_trans(skb, dev);
|
skb->protocol = mpt_lan_type_trans(skb, dev);
|
||||||
|
|
||||||
@ -866,7 +866,7 @@ mpt_lan_receive_skb(struct net_device *dev, struct sk_buff *skb)
|
|||||||
static int
|
static int
|
||||||
mpt_lan_receive_post_turbo(struct net_device *dev, u32 tmsg)
|
mpt_lan_receive_post_turbo(struct net_device *dev, u32 tmsg)
|
||||||
{
|
{
|
||||||
struct mpt_lan_priv *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 *skb, *old_skb;
|
struct sk_buff *skb, *old_skb;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
@ -921,7 +921,7 @@ static int
|
|||||||
mpt_lan_receive_post_free(struct net_device *dev,
|
mpt_lan_receive_post_free(struct net_device *dev,
|
||||||
LANReceivePostReply_t *pRecvRep)
|
LANReceivePostReply_t *pRecvRep)
|
||||||
{
|
{
|
||||||
struct mpt_lan_priv *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 long flags;
|
unsigned long flags;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
@ -976,7 +976,7 @@ static int
|
|||||||
mpt_lan_receive_post_reply(struct net_device *dev,
|
mpt_lan_receive_post_reply(struct net_device *dev,
|
||||||
LANReceivePostReply_t *pRecvRep)
|
LANReceivePostReply_t *pRecvRep)
|
||||||
{
|
{
|
||||||
struct mpt_lan_priv *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 *skb, *old_skb;
|
struct sk_buff *skb, *old_skb;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -122,7 +122,7 @@ MODULE_DESCRIPTION(LANAME);
|
|||||||
#define dlprintk(x)
|
#define dlprintk(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define NETDEV_TO_LANPRIV_PTR(d) ((struct mpt_lan_priv *)(d)->priv)
|
#define NETDEV_TO_LANPRIV_PTR(d) ((struct mpt_lan_priv *)netdev_priv(d))
|
||||||
#define NETDEV_PTR_TO_IOC_NAME_s(d) (NETDEV_TO_LANPRIV_PTR(d)->mpt_dev->name)
|
#define NETDEV_PTR_TO_IOC_NAME_s(d) (NETDEV_TO_LANPRIV_PTR(d)->mpt_dev->name)
|
||||||
#define IOC_AND_NETDEV_NAMES_s_s(d) NETDEV_PTR_TO_IOC_NAME_s(d), (d)->name
|
#define IOC_AND_NETDEV_NAMES_s_s(d) NETDEV_PTR_TO_IOC_NAME_s(d), (d)->name
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user