OSDN Git Service

mei: iamthif: remove useless iamthif_ioctl variable
authorTomas Winkler <tomas.winkler@intel.com>
Tue, 10 Feb 2015 08:39:38 +0000 (10:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 03:37:00 +0000 (19:37 -0800)
iamthif_ioctl is obsolete and can be safely dropped
Currently it is set to true during driver runtime

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/interrupt.c
drivers/misc/mei/mei_dev.h

index 2ad2f94..788b00e 100644 (file)
@@ -52,7 +52,6 @@ void mei_amthif_reset_params(struct mei_device *dev)
        dev->iamthif_msg_buf_size = 0;
        dev->iamthif_msg_buf_index = 0;
        dev->iamthif_canceled = false;
-       dev->iamthif_ioctl = false;
        dev->iamthif_state = MEI_IAMTHIF_IDLE;
        dev->iamthif_timer = 0;
        dev->iamthif_stall_timer = 0;
@@ -279,7 +278,6 @@ static int mei_amthif_send_cmd(struct mei_device *dev, struct mei_cl_cb *cb)
        dev->iamthif_current_cb = cb;
        dev->iamthif_file_object = cb->file_object;
        dev->iamthif_canceled = false;
-       dev->iamthif_ioctl = true;
        dev->iamthif_msg_buf_size = cb->request_buffer.size;
        memcpy(dev->iamthif_msg_buf, cb->request_buffer.data,
               cb->request_buffer.size);
@@ -375,7 +373,6 @@ void mei_amthif_run_next_cmd(struct mei_device *dev)
        dev->iamthif_msg_buf_size = 0;
        dev->iamthif_msg_buf_index = 0;
        dev->iamthif_canceled = false;
-       dev->iamthif_ioctl = true;
        dev->iamthif_state = MEI_IAMTHIF_IDLE;
        dev->iamthif_timer = 0;
        dev->iamthif_file_object = NULL;
@@ -554,11 +551,9 @@ int mei_amthif_irq_read_msg(struct mei_cl *cl,
        dev->iamthif_stall_timer = 0;
        cb->buf_idx = dev->iamthif_msg_buf_index;
        cb->read_time = jiffies;
-       if (dev->iamthif_ioctl) {
-               /* found the iamthif cb */
-               dev_dbg(dev->dev, "complete the amthif read cb.\n ");
-               list_add_tail(&cb->list, &complete_list->list);
-       }
+
+       dev_dbg(dev->dev, "complete the amthif read cb.\n ");
+       list_add_tail(&cb->list, &complete_list->list);
 
        return 0;
 
index 151f0c8..4cb602f 100644 (file)
@@ -589,7 +589,6 @@ void mei_timer(struct work_struct *work)
                        dev->iamthif_msg_buf_size = 0;
                        dev->iamthif_msg_buf_index = 0;
                        dev->iamthif_canceled = false;
-                       dev->iamthif_ioctl = true;
                        dev->iamthif_state = MEI_IAMTHIF_IDLE;
                        dev->iamthif_timer = 0;
 
index b74d156..6cc68de 100644 (file)
@@ -488,7 +488,6 @@ const char *mei_pg_state_str(enum mei_pg_state state);
  * @iamthif_msg_buf_index : current index in amthif message request buffer
  * @iamthif_state : amthif processor state
  * @iamthif_flow_control_pending: amthif waits for flow control
- * @iamthif_ioctl : wait for completion if amthif control message
  * @iamthif_canceled : current amthif command is canceled
  *
  * @init_work   : work item for the device init
@@ -588,7 +587,6 @@ struct mei_device {
        u32 iamthif_msg_buf_index;
        enum iamthif_states iamthif_state;
        bool iamthif_flow_control_pending;
-       bool iamthif_ioctl;
        bool iamthif_canceled;
 
        struct work_struct init_work;