mei: move work initialization to mei_device_init
authorTomas Winkler <tomas.winkler@intel.com>
Tue, 8 Jan 2013 21:07:32 +0000 (23:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2013 00:40:48 +0000 (16:40 -0800)
Let mei_device_init initialize all the software constructs.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/init.c
drivers/misc/mei/main.c

index 98a7fc18a90a1bf64f3dc6369e6e60eac54ffe11..5d08db5b314e21f6d07037a20550c128406f51b5 100644 (file)
@@ -76,6 +76,10 @@ struct mei_device *mei_device_init(struct pci_dev *pdev)
        mei_io_list_init(&dev->ctrl_rd_list);
        mei_io_list_init(&dev->amthif_cmd_list);
        mei_io_list_init(&dev->amthif_rd_complete_list);
+
+       INIT_DELAYED_WORK(&dev->timer_work, mei_timer);
+       INIT_WORK(&dev->init_work, mei_host_client_init);
+
        dev->pdev = pdev;
        return dev;
 }
index f72bb77fc279a1c887d8ba430fb1554a6d88a96a..123c663509ef21f42f8cd85b21824754fae0d4d0 100644 (file)
@@ -889,8 +889,6 @@ static int mei_probe(struct pci_dev *pdev,
                       pdev->irq);
                goto disable_msi;
        }
-       INIT_DELAYED_WORK(&dev->timer_work, mei_timer);
-       INIT_WORK(&dev->init_work, mei_host_client_init);
 
        if (mei_hw_init(dev)) {
                dev_err(&pdev->dev, "init hw failure.\n");