Commit d242a0af authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

mei: remove write only wariable wd_due_counter

Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4a0d6a74
...@@ -306,7 +306,6 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled) ...@@ -306,7 +306,6 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled)
dev->iamthif_cl.host_client_id); dev->iamthif_cl.host_client_id);
mei_reset_iamthif_params(dev); mei_reset_iamthif_params(dev);
dev->wd_due_counter = 0;
dev->extra_write_index = 0; dev->extra_write_index = 0;
} }
......
...@@ -575,10 +575,9 @@ static void mei_client_disconnect_request(struct mei_device *dev, ...@@ -575,10 +575,9 @@ static void mei_client_disconnect_request(struct mei_device *dev,
disconnect_req->me_addr); disconnect_req->me_addr);
cl_pos->state = MEI_FILE_DISCONNECTED; cl_pos->state = MEI_FILE_DISCONNECTED;
cl_pos->timer_count = 0; cl_pos->timer_count = 0;
if (cl_pos == &dev->wd_cl) { if (cl_pos == &dev->wd_cl)
dev->wd_due_counter = 0;
dev->wd_pending = false; dev->wd_pending = false;
} else if (cl_pos == &dev->iamthif_cl) else if (cl_pos == &dev->iamthif_cl)
dev->iamthif_timer = 0; dev->iamthif_timer = 0;
/* prepare disconnect response */ /* prepare disconnect response */
...@@ -1266,15 +1265,12 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list, ...@@ -1266,15 +1265,12 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list,
dev->wd_pending = false; dev->wd_pending = false;
if (dev->wd_timeout) { if (dev->wd_timeout)
*slots -= (sizeof(struct mei_msg_hdr) + *slots -= (sizeof(struct mei_msg_hdr) +
MEI_START_WD_DATA_SIZE + 3) / 4; MEI_START_WD_DATA_SIZE + 3) / 4;
dev->wd_due_counter = 2; else
} else {
*slots -= (sizeof(struct mei_msg_hdr) + *slots -= (sizeof(struct mei_msg_hdr) +
MEI_WD_PARAMS_SIZE + 3) / 4; MEI_WD_PARAMS_SIZE + 3) / 4;
dev->wd_due_counter = 0;
}
} }
} }
......
...@@ -246,7 +246,6 @@ struct mei_device { ...@@ -246,7 +246,6 @@ struct mei_device {
bool wd_stopped; bool wd_stopped;
bool wd_bypass; /* if false, don't refresh watchdog ME client */ bool wd_bypass; /* if false, don't refresh watchdog ME client */
u16 wd_timeout; /* seconds ((wd_data[1] << 8) + wd_data[0]) */ u16 wd_timeout; /* seconds ((wd_data[1] << 8) + wd_data[0]) */
u16 wd_due_counter;
unsigned char wd_data[MEI_START_WD_DATA_SIZE]; unsigned char wd_data[MEI_START_WD_DATA_SIZE];
......
...@@ -137,7 +137,6 @@ int mei_wd_stop(struct mei_device *dev, bool preserve) ...@@ -137,7 +137,6 @@ int mei_wd_stop(struct mei_device *dev, bool preserve)
return 0; return 0;
dev->wd_timeout = 0; dev->wd_timeout = 0;
dev->wd_due_counter = 0;
memcpy(dev->wd_data, mei_stop_wd_params, MEI_WD_PARAMS_SIZE); memcpy(dev->wd_data, mei_stop_wd_params, MEI_WD_PARAMS_SIZE);
dev->stop = true; dev->stop = true;
...@@ -357,8 +356,6 @@ void mei_watchdog_register(struct mei_device *dev) ...@@ -357,8 +356,6 @@ void mei_watchdog_register(struct mei_device *dev)
{ {
dev_dbg(&dev->pdev->dev, "dev->wd_timeout =%d.\n", dev->wd_timeout); dev_dbg(&dev->pdev->dev, "dev->wd_timeout =%d.\n", dev->wd_timeout);
dev->wd_due_counter = !!dev->wd_timeout;
if (watchdog_register_device(&amt_wd_dev)) { if (watchdog_register_device(&amt_wd_dev)) {
dev_err(&dev->pdev->dev, dev_err(&dev->pdev->dev,
"wd: unable to register watchdog device.\n"); "wd: unable to register watchdog device.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment