mei: move MEI_IAMTHIF_IDLE to amthif host init function
authorTomas Winkler <tomas.winkler@intel.com>
Tue, 8 Jan 2013 21:07:23 +0000 (23:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2013 00:40:46 +0000 (16:40 -0800)
Since the amthif state is not examined until amthif is connected
we can safely move it to the amthif host init function

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

index 88e6aa0f6b4eb5e9cf01f4ea7153ee794d2d3d84..7199e8369f1e492eedc69067f5079028f80e9411 100644 (file)
@@ -71,6 +71,8 @@ int mei_amthif_host_init(struct mei_device *dev)
        unsigned char *msg_buf;
        int ret, i;
 
+       dev->iamthif_state = MEI_IAMTHIF_IDLE;
+
        mei_cl_init(cl, dev);
 
        i = mei_me_cl_by_uuid(dev, &mei_amthif_guid);
index 9e4011ef850860975f404f7e59fff8d8dbcb54b2..70fad4ea474cb63ee0c05455c3162957bafc18a6 100644 (file)
@@ -68,7 +68,6 @@ struct mei_device *mei_device_init(struct pci_dev *pdev)
        init_waitqueue_head(&dev->wait_recvd_msg);
        init_waitqueue_head(&dev->wait_stop_wd);
        dev->dev_state = MEI_DEV_INITIALIZING;
-       dev->iamthif_state = MEI_IAMTHIF_IDLE;
 
        mei_io_list_init(&dev->read_list);
        mei_io_list_init(&dev->write_list);