mei: drop amthif internal client
[linux-2.6-microblaze.git] / drivers / misc / mei / init.c
index cfb1cdf..c8ad9ee 100644 (file)
@@ -124,8 +124,6 @@ int mei_reset(struct mei_device *dev)
 
        mei_clear_interrupts(dev);
 
-       mei_synchronize_irq(dev);
-
        /* we're already in reset, cancel the init timer
         * if the reset was called due the hbm protocol error
         * we need to call it before hw start
@@ -148,18 +146,9 @@ int mei_reset(struct mei_device *dev)
        /* fall through and remove the sw state even if hw reset has failed */
 
        /* no need to clean up software state in case of power up */
-       if (state != MEI_DEV_INITIALIZING &&
-           state != MEI_DEV_POWER_UP) {
-
-               /* remove all waiting requests */
+       if (state != MEI_DEV_INITIALIZING && state != MEI_DEV_POWER_UP)
                mei_cl_all_disconnect(dev);
 
-               /* remove entry if already in list */
-               dev_dbg(dev->dev, "remove iamthif from the file list.\n");
-               mei_cl_unlink(&dev->iamthif_cl);
-               mei_amthif_reset_params(dev);
-       }
-
        mei_hbm_reset(dev);
 
        dev->rd_msg_hdr = 0;
@@ -304,6 +293,9 @@ static void mei_reset_work(struct work_struct *work)
                container_of(work, struct mei_device,  reset_work);
        int ret;
 
+       mei_clear_interrupts(dev);
+       mei_synchronize_irq(dev);
+
        mutex_lock(&dev->device_lock);
 
        ret = mei_reset(dev);
@@ -328,6 +320,9 @@ void mei_stop(struct mei_device *dev)
 
        mei_cancel_work(dev);
 
+       mei_clear_interrupts(dev);
+       mei_synchronize_irq(dev);
+
        mutex_lock(&dev->device_lock);
 
        dev->dev_state = MEI_DEV_POWER_DOWN;
@@ -397,9 +392,6 @@ void mei_device_init(struct mei_device *dev,
        INIT_WORK(&dev->reset_work, mei_reset_work);
        INIT_WORK(&dev->bus_rescan_work, mei_cl_bus_rescan_work);
 
-       INIT_LIST_HEAD(&dev->iamthif_cl.link);
-       INIT_LIST_HEAD(&dev->amthif_cmd_list);
-
        bitmap_zero(dev->host_clients_map, MEI_CLIENTS_MAX);
        dev->open_handle_count = 0;