netdev: add missing set_mac_address hook
[safe/jmp/linux-2.6] / drivers / net / smsc911x.c
index 761b96c..020c583 100644 (file)
@@ -822,7 +822,6 @@ static int __devinit smsc911x_mii_init(struct platform_device *pdev,
                pdata->mii_bus->irq[i] = PHY_POLL;
 
        pdata->mii_bus->parent = &pdev->dev;
-       dev_set_drvdata(&pdev->dev, &pdata->mii_bus);
 
        pdata->using_extphy = 0;
 
@@ -1485,13 +1484,13 @@ static irqreturn_t smsc911x_irqhandler(int irq, void *dev_id)
        }
 
        if (likely(intsts & inten & INT_STS_RSFL_)) {
-               if (likely(netif_rx_schedule_prep(dev, &pdata->napi))) {
+               if (likely(netif_rx_schedule_prep(&pdata->napi))) {
                        /* Disable Rx interrupts */
                        temp = smsc911x_reg_read(pdata, INT_EN);
                        temp &= (~INT_EN_RSFL_EN_);
                        smsc911x_reg_write(pdata, INT_EN, temp);
                        /* Schedule a NAPI poll */
-                       __netif_rx_schedule(dev, &pdata->napi);
+                       __netif_rx_schedule(&pdata->napi);
                } else {
                        SMSC_WARNING(RX_ERR,
                                "netif_rx_schedule_prep failed");
@@ -1718,7 +1717,7 @@ static int smsc911x_ethtool_set_eeprom(struct net_device *dev,
        return ret;
 }
 
-static struct ethtool_ops smsc911x_ethtool_ops = {
+static const struct ethtool_ops smsc911x_ethtool_ops = {
        .get_settings = smsc911x_ethtool_getsettings,
        .set_settings = smsc911x_ethtool_setsettings,
        .get_link = ethtool_op_get_link,
@@ -1741,6 +1740,7 @@ static const struct net_device_ops smsc911x_netdev_ops = {
        .ndo_set_multicast_list = smsc911x_set_multicast_list,
        .ndo_do_ioctl           = smsc911x_do_ioctl,
        .ndo_validate_addr      = eth_validate_addr,
+       .ndo_set_mac_address    = eth_mac_addr,
 #ifdef CONFIG_NET_POLL_CONTROLLER
        .ndo_poll_controller    = smsc911x_poll_controller,
 #endif
@@ -1875,7 +1875,7 @@ static int __devexit smsc911x_drv_remove(struct platform_device *pdev)
        res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
                                           "smsc911x-memory");
        if (!res)
-               platform_get_resource(pdev, IORESOURCE_MEM, 0);
+               res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
        release_mem_region(res->start, res->end - res->start);