WorkStruct: make allyesconfig
[deliverable/linux.git] / drivers / net / chelsio / cxgb2.c
index 7fe2638ae06d9b64748a0997cdf66f157a7280b3..f607cc6a276bbf3ed39a1c9e735dbe2f0753ef8c 100644 (file)
@@ -37,7 +37,6 @@
  ****************************************************************************/
 
 #include "common.h"
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/pci.h>
@@ -219,7 +218,7 @@ static int cxgb_up(struct adapter *adapter)
 
        t1_interrupts_clear(adapter);
        if ((err = request_irq(adapter->pdev->irq,
-                              t1_select_intr_handler(adapter), SA_SHIRQ,
+                              t1_select_intr_handler(adapter), IRQF_SHARED,
                               adapter->name, adapter))) {
                goto out_err;
        }
@@ -780,7 +779,7 @@ static int get_eeprom(struct net_device *dev, struct ethtool_eeprom *e,
        return 0;
 }
 
-static struct ethtool_ops t1_ethtool_ops = {
+static const struct ethtool_ops t1_ethtool_ops = {
        .get_settings      = get_settings,
        .set_settings      = set_settings,
        .get_drvinfo       = get_drvinfo,
@@ -919,7 +918,7 @@ static void t1_netpoll(struct net_device *dev)
        struct adapter *adapter = dev->priv;
 
        local_irq_save(flags);
-        t1_select_intr_handler(adapter)(adapter->pdev->irq, adapter, NULL);
+        t1_select_intr_handler(adapter)(adapter->pdev->irq, adapter);
        local_irq_restore(flags);
 }
 #endif
@@ -928,10 +927,11 @@ static void t1_netpoll(struct net_device *dev)
  * Periodic accumulation of MAC statistics.  This is used only if the MAC
  * does not have any other way to prevent stats counter overflow.
  */
-static void mac_stats_task(void *data)
+static void mac_stats_task(struct work_struct *work)
 {
        int i;
-       struct adapter *adapter = data;
+       struct adapter *adapter =
+               container_of(work, struct adapter, stats_update_task.work);
 
        for_each_port(adapter, i) {
                struct port_info *p = &adapter->port[i];
@@ -952,9 +952,10 @@ static void mac_stats_task(void *data)
 /*
  * Processes elmer0 external interrupts in process context.
  */
-static void ext_intr_task(void *data)
+static void ext_intr_task(struct work_struct *work)
 {
-       struct adapter *adapter = data;
+       struct adapter *adapter =
+               container_of(work, struct adapter, ext_intr_handler_task);
 
        elmer0_ext_intr_handler(adapter);
 
@@ -1088,9 +1089,9 @@ static int __devinit init_one(struct pci_dev *pdev,
                        spin_lock_init(&adapter->async_lock);
 
                        INIT_WORK(&adapter->ext_intr_handler_task,
-                                 ext_intr_task, adapter);
-                       INIT_WORK(&adapter->stats_update_task, mac_stats_task,
-                                 adapter);
+                                 ext_intr_task);
+                       INIT_DELAYED_WORK(&adapter->stats_update_task,
+                                         mac_stats_task);
 #ifdef work_struct
                        init_timer(&adapter->stats_update_timer);
                        adapter->stats_update_timer.function = mac_stats_timer;
@@ -1244,7 +1245,7 @@ static struct pci_driver driver = {
 
 static int __init t1_init_module(void)
 {
-       return pci_module_init(&driver);
+       return pci_register_driver(&driver);
 }
 
 static void __exit t1_cleanup_module(void)
This page took 0.025574 seconds and 5 git commands to generate.