drivers/net: const-ify ethtool_ops declarations
[linux-2.6.git] / drivers / net / dm9000.c
index 7eea8e1..a860ebb 100644 (file)
@@ -339,6 +339,17 @@ static void dm9000_timeout(struct net_device *dev)
        spin_unlock_irqrestore(&db->lock,flags);
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/*
+ *Used by netconsole
+ */
+static void dm9000_poll_controller(struct net_device *dev)
+{
+       disable_irq(dev->irq);
+       dm9000_interrupt(dev->irq,dev,NULL);
+       enable_irq(dev->irq);
+}
+#endif
 
 /* dm9000_release_board
  *
@@ -366,8 +377,8 @@ dm9000_release_board(struct platform_device *pdev, struct board_info *db)
                kfree(db->data_req);
        }
 
-       if (db->addr_res != NULL) {
-               release_resource(db->addr_res);
+       if (db->addr_req != NULL) {
+               release_resource(db->addr_req);
                kfree(db->addr_req);
        }
 }
@@ -538,6 +549,9 @@ dm9000_probe(struct platform_device *pdev)
        ndev->stop               = &dm9000_stop;
        ndev->get_stats          = &dm9000_get_stats;
        ndev->set_multicast_list = &dm9000_hash_table;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       ndev->poll_controller    = &dm9000_poll_controller;
+#endif
 
 #ifdef DM9000_PROGRAM_EEPROM
        program_eeprom(db);
@@ -603,7 +617,7 @@ dm9000_open(struct net_device *dev)
 
        PRINTK2("entering dm9000_open\n");
 
-       if (request_irq(dev->irq, &dm9000_interrupt, SA_SHIRQ, dev->name, dev))
+       if (request_irq(dev->irq, &dm9000_interrupt, IRQF_SHARED, dev->name, dev))
                return -EAGAIN;
 
        /* Initialize DM9000 board */
@@ -768,7 +782,7 @@ dm9000_stop(struct net_device *ndev)
  * receive the packet to upper layer, free the transmitted packet
  */
 
-void
+static void
 dm9000_tx_done(struct net_device *dev, board_info_t * db)
 {
        int tx_status = ior(db, DM9000_NSR);    /* Got TX status */
@@ -1188,13 +1202,14 @@ dm9000_drv_remove(struct platform_device *pdev)
 }
 
 static struct platform_driver dm9000_driver = {
+       .driver = {
+               .name    = "dm9000",
+               .owner   = THIS_MODULE,
+       },
        .probe   = dm9000_probe,
        .remove  = dm9000_drv_remove,
        .suspend = dm9000_drv_suspend,
        .resume  = dm9000_drv_resume,
-       .driver = {
-               .name   = "dm9000",
-       },
 };
 
 static int __init