Commit ec7689a2 authored by Jeff Garzik's avatar Jeff Garzik

[net drivers] Remove 'dev' argument from generic_mii_ioctl helper

parent 47229b82
...@@ -1664,7 +1664,7 @@ static int cp_ioctl (struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1664,7 +1664,7 @@ static int cp_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
if (cmd == SIOCETHTOOL) if (cmd == SIOCETHTOOL)
return cp_ethtool_ioctl(cp, (void *) rq->ifr_data); return cp_ethtool_ioctl(cp, (void *) rq->ifr_data);
rc = generic_mii_ioctl(dev, &cp->mii_if, mii, cmd); rc = generic_mii_ioctl(&cp->mii_if, mii, cmd);
if (rc == 1) /* we don't care about duplex change, fixup rc */ if (rc == 1) /* we don't care about duplex change, fixup rc */
rc = 0; rc = 0;
return rc; return rc;
......
...@@ -2454,7 +2454,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -2454,7 +2454,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
else { else {
spin_lock_irq(&np->lock); spin_lock_irq(&np->lock);
rc = generic_mii_ioctl(dev, &np->mii, data, cmd); rc = generic_mii_ioctl(&np->mii, data, cmd);
spin_unlock_irq(&np->lock); spin_unlock_irq(&np->lock);
if (rc == 1) /* don't care about duplex change, fix up rc */ if (rc == 1) /* don't care about duplex change, fix up rc */
......
...@@ -1446,7 +1446,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1446,7 +1446,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
/* all other ioctls (the SIOC[GS]MIIxxx ioctls) */ /* all other ioctls (the SIOC[GS]MIIxxx ioctls) */
else { else {
spin_lock_irq(&np->lock); spin_lock_irq(&np->lock);
rc = generic_mii_ioctl(dev, &np->mii, data, cmd); rc = generic_mii_ioctl(&np->mii, data, cmd);
spin_unlock_irq(&np->lock); spin_unlock_irq(&np->lock);
if (rc == 1) /* don't care about duplex change, fixup rc */ if (rc == 1) /* don't care about duplex change, fixup rc */
rc = 0; rc = 0;
......
...@@ -1847,7 +1847,7 @@ static int mii_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1847,7 +1847,7 @@ static int mii_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
else { else {
spin_lock_irq(&np->lock); spin_lock_irq(&np->lock);
rc = generic_mii_ioctl(dev, &np->mii, data, cmd); rc = generic_mii_ioctl(&np->mii, data, cmd);
spin_unlock_irq(&np->lock); spin_unlock_irq(&np->lock);
if (rc == 1) /* don't care about duplex change, fix up rc */ if (rc == 1) /* don't care about duplex change, fix up rc */
rc = 0; rc = 0;
......
...@@ -261,7 +261,7 @@ unsigned int mii_check_media (struct mii_if_info *mii, ...@@ -261,7 +261,7 @@ unsigned int mii_check_media (struct mii_if_info *mii,
return 0; /* duplex did not change */ return 0; /* duplex did not change */
} }
int generic_mii_ioctl(struct net_device *dev, struct mii_if_info *mii_if, int generic_mii_ioctl(struct mii_if_info *mii_if,
struct mii_ioctl_data *mii_data, int cmd) struct mii_ioctl_data *mii_data, int cmd)
{ {
int rc = 0; int rc = 0;
...@@ -277,7 +277,7 @@ int generic_mii_ioctl(struct net_device *dev, struct mii_if_info *mii_if, ...@@ -277,7 +277,7 @@ int generic_mii_ioctl(struct net_device *dev, struct mii_if_info *mii_if,
case SIOCGMIIREG: case SIOCGMIIREG:
mii_data->val_out = mii_data->val_out =
mii_if->mdio_read(dev, mii_data->phy_id, mii_if->mdio_read(mii_if->dev, mii_data->phy_id,
mii_data->reg_num); mii_data->reg_num);
break; break;
...@@ -313,7 +313,7 @@ int generic_mii_ioctl(struct net_device *dev, struct mii_if_info *mii_if, ...@@ -313,7 +313,7 @@ int generic_mii_ioctl(struct net_device *dev, struct mii_if_info *mii_if,
} }
} }
mii_if->mdio_write(dev, mii_data->phy_id, mii_if->mdio_write(mii_if->dev, mii_data->phy_id,
mii_data->reg_num, val); mii_data->reg_num, val);
break; break;
} }
......
...@@ -1564,7 +1564,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1564,7 +1564,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
else { else {
spin_lock_irq(&np->lock); spin_lock_irq(&np->lock);
rc = generic_mii_ioctl(dev, &np->mii_if, data, cmd); rc = generic_mii_ioctl(&np->mii_if, data, cmd);
spin_unlock_irq(&np->lock); spin_unlock_irq(&np->lock);
if (rc == 1) /* don't care about duplex change, fix up rc */ if (rc == 1) /* don't care about duplex change, fix up rc */
rc = 0; rc = 0;
......
...@@ -1686,7 +1686,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1686,7 +1686,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
else { else {
spin_lock_irq(&np->lock); spin_lock_irq(&np->lock);
rc = generic_mii_ioctl(dev, &np->mii_if, data, cmd); rc = generic_mii_ioctl(&np->mii_if, data, cmd);
spin_unlock_irq(&np->lock); spin_unlock_irq(&np->lock);
if (rc == 1) /* don't care about duplex change, fix up rc */ if (rc == 1) /* don't care about duplex change, fix up rc */
rc = 0; rc = 0;
......
...@@ -129,7 +129,7 @@ extern void mii_check_link (struct mii_if_info *mii); ...@@ -129,7 +129,7 @@ extern void mii_check_link (struct mii_if_info *mii);
extern unsigned int mii_check_media (struct mii_if_info *mii, extern unsigned int mii_check_media (struct mii_if_info *mii,
unsigned int ok_to_print, unsigned int ok_to_print,
unsigned int init_media); unsigned int init_media);
extern int generic_mii_ioctl(struct net_device *dev, struct mii_if_info *mii_if, extern int generic_mii_ioctl(struct mii_if_info *mii_if,
struct mii_ioctl_data *mii_data, int cmd); struct mii_ioctl_data *mii_data, int cmd);
......
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