This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / net / eepro100.c
index cc83bdd..6af982b 100644 (file)
@@ -87,12 +87,6 @@ static int options[] = {-1, -1, -1, -1, -1, -1, -1, -1};
 /* Size of an pre-allocated Rx buffer: <Ethernet MTU> + slack.*/
 #define PKT_BUF_SZ             1536
 
-#if !defined(__OPTIMIZE__)  ||  !defined(__KERNEL__)
-#warning  You must compile this file with the correct options!
-#warning  See the last lines of the source file.
-#error You must compile this driver with "-O".
-#endif
-
 #include <linux/config.h>
 #include <linux/version.h>
 #include <linux/module.h>
@@ -120,7 +114,6 @@ static int options[] = {-1, -1, -1, -1, -1, -1, -1, -1};
 #include <linux/rtnetlink.h>
 #include <linux/skbuff.h>
 #include <linux/ethtool.h>
-#include <linux/mii.h>
 
 /* enable PIO instead of MMIO, if CONFIG_EEPRO100_PIO is selected */
 #ifdef CONFIG_EEPRO100_PIO
@@ -2018,7 +2011,7 @@ speedo_get_stats(struct net_device *dev)
        return &sp->stats;
 }
 
-static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        u32 ethcmd;
        struct speedo_private *sp = netdev_priv(dev);
@@ -2097,7 +2090,7 @@ static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
 static int speedo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
        struct speedo_private *sp = netdev_priv(dev);
-       struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data;
+       struct mii_ioctl_data *data = if_mii(rq);
        int phy = sp->phy[0] & 0x1f;
        int saved_acpi;
        int t;
@@ -2130,7 +2123,7 @@ static int speedo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
                pci_set_power_state(sp->pdev, saved_acpi);
                return 0;
        case SIOCETHTOOL:
-               return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+               return netdev_ethtool_ioctl(dev, rq->ifr_data);
        default:
                return -EOPNOTSUPP;
        }