mei: ME structures should be initialized in mei_device_init
authorTomas Winkler <tomas.winkler@intel.com>
Wed, 27 Mar 2013 14:58:27 +0000 (16:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Mar 2013 15:32:21 +0000 (08:32 -0700)
mei_timer and mei_host_client_init belongs to mei framework
and are not ME hw specific.
AMTHIF and WD are available only for ME but are above the hardware layer
so move the initialization back from mei_me_dev_init to mei_device_init.

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

index 7c2b14d714b970cf3e8b102000058eaac5b19415..12c2fa195e566e5e394e1998dadc5dcc75ea6ce1 100644 (file)
@@ -583,14 +583,6 @@ struct mei_device *mei_me_dev_init(struct pci_dev *pdev)
 
        mei_device_init(dev);
 
-       INIT_LIST_HEAD(&dev->wd_cl.link);
-       INIT_LIST_HEAD(&dev->iamthif_cl.link);
-       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->ops = &mei_me_hw_ops;
 
        dev->pdev = pdev;
index aced38c9f6a830261e660ae561dce0eaa2301330..33f56308ba3c9b13891413aeb708ac4550c866ef 100644 (file)
@@ -57,6 +57,15 @@ void mei_device_init(struct mei_device *dev)
        mei_io_list_init(&dev->write_waiting_list);
        mei_io_list_init(&dev->ctrl_wr_list);
        mei_io_list_init(&dev->ctrl_rd_list);
+
+       INIT_DELAYED_WORK(&dev->timer_work, mei_timer);
+       INIT_WORK(&dev->init_work, mei_host_client_init);
+
+       INIT_LIST_HEAD(&dev->wd_cl.link);
+       INIT_LIST_HEAD(&dev->iamthif_cl.link);
+       mei_io_list_init(&dev->amthif_cmd_list);
+       mei_io_list_init(&dev->amthif_rd_complete_list);
+
 }
 
 /**