diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2012-07-04 12:24:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-10 17:58:35 -0400 |
commit | d242a0afb2e5bf1db83c6a0504e55addef425e61 (patch) | |
tree | dfc7b56408001c84c73864cdb67aac2b0b725556 /drivers/misc | |
parent | 4a0d6a74638f44055ea536abdd428007e5f2f89e (diff) |
mei: remove write only wariable wd_due_counter
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/mei/init.c | 1 | ||||
-rw-r--r-- | drivers/misc/mei/interrupt.c | 12 | ||||
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 1 | ||||
-rw-r--r-- | drivers/misc/mei/wd.c | 3 |
4 files changed, 4 insertions, 13 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index d39b2774535b..e77f86e69fb5 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c | |||
@@ -306,7 +306,6 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled) | |||
306 | dev->iamthif_cl.host_client_id); | 306 | dev->iamthif_cl.host_client_id); |
307 | 307 | ||
308 | mei_reset_iamthif_params(dev); | 308 | mei_reset_iamthif_params(dev); |
309 | dev->wd_due_counter = 0; | ||
310 | dev->extra_write_index = 0; | 309 | dev->extra_write_index = 0; |
311 | } | 310 | } |
312 | 311 | ||
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c index 1872a2a760e5..4c1afcf6f4e9 100644 --- a/drivers/misc/mei/interrupt.c +++ b/drivers/misc/mei/interrupt.c | |||
@@ -575,10 +575,9 @@ static void mei_client_disconnect_request(struct mei_device *dev, | |||
575 | disconnect_req->me_addr); | 575 | disconnect_req->me_addr); |
576 | cl_pos->state = MEI_FILE_DISCONNECTED; | 576 | cl_pos->state = MEI_FILE_DISCONNECTED; |
577 | cl_pos->timer_count = 0; | 577 | cl_pos->timer_count = 0; |
578 | if (cl_pos == &dev->wd_cl) { | 578 | if (cl_pos == &dev->wd_cl) |
579 | dev->wd_due_counter = 0; | ||
580 | dev->wd_pending = false; | 579 | dev->wd_pending = false; |
581 | } else if (cl_pos == &dev->iamthif_cl) | 580 | else if (cl_pos == &dev->iamthif_cl) |
582 | dev->iamthif_timer = 0; | 581 | dev->iamthif_timer = 0; |
583 | 582 | ||
584 | /* prepare disconnect response */ | 583 | /* prepare disconnect response */ |
@@ -1266,15 +1265,12 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list, | |||
1266 | 1265 | ||
1267 | dev->wd_pending = false; | 1266 | dev->wd_pending = false; |
1268 | 1267 | ||
1269 | if (dev->wd_timeout) { | 1268 | if (dev->wd_timeout) |
1270 | *slots -= (sizeof(struct mei_msg_hdr) + | 1269 | *slots -= (sizeof(struct mei_msg_hdr) + |
1271 | MEI_START_WD_DATA_SIZE + 3) / 4; | 1270 | MEI_START_WD_DATA_SIZE + 3) / 4; |
1272 | dev->wd_due_counter = 2; | 1271 | else |
1273 | } else { | ||
1274 | *slots -= (sizeof(struct mei_msg_hdr) + | 1272 | *slots -= (sizeof(struct mei_msg_hdr) + |
1275 | MEI_WD_PARAMS_SIZE + 3) / 4; | 1273 | MEI_WD_PARAMS_SIZE + 3) / 4; |
1276 | dev->wd_due_counter = 0; | ||
1277 | } | ||
1278 | 1274 | ||
1279 | } | 1275 | } |
1280 | } | 1276 | } |
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 772f74dcd2ad..d61c4ddfc80c 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h | |||
@@ -246,7 +246,6 @@ struct mei_device { | |||
246 | bool wd_stopped; | 246 | bool wd_stopped; |
247 | bool wd_bypass; /* if false, don't refresh watchdog ME client */ | 247 | bool wd_bypass; /* if false, don't refresh watchdog ME client */ |
248 | u16 wd_timeout; /* seconds ((wd_data[1] << 8) + wd_data[0]) */ | 248 | u16 wd_timeout; /* seconds ((wd_data[1] << 8) + wd_data[0]) */ |
249 | u16 wd_due_counter; | ||
250 | unsigned char wd_data[MEI_START_WD_DATA_SIZE]; | 249 | unsigned char wd_data[MEI_START_WD_DATA_SIZE]; |
251 | 250 | ||
252 | 251 | ||
diff --git a/drivers/misc/mei/wd.c b/drivers/misc/mei/wd.c index 6be5605707b4..325d26f29746 100644 --- a/drivers/misc/mei/wd.c +++ b/drivers/misc/mei/wd.c | |||
@@ -137,7 +137,6 @@ int mei_wd_stop(struct mei_device *dev, bool preserve) | |||
137 | return 0; | 137 | return 0; |
138 | 138 | ||
139 | dev->wd_timeout = 0; | 139 | dev->wd_timeout = 0; |
140 | dev->wd_due_counter = 0; | ||
141 | memcpy(dev->wd_data, mei_stop_wd_params, MEI_WD_PARAMS_SIZE); | 140 | memcpy(dev->wd_data, mei_stop_wd_params, MEI_WD_PARAMS_SIZE); |
142 | dev->stop = true; | 141 | dev->stop = true; |
143 | 142 | ||
@@ -357,8 +356,6 @@ void mei_watchdog_register(struct mei_device *dev) | |||
357 | { | 356 | { |
358 | dev_dbg(&dev->pdev->dev, "dev->wd_timeout =%d.\n", dev->wd_timeout); | 357 | dev_dbg(&dev->pdev->dev, "dev->wd_timeout =%d.\n", dev->wd_timeout); |
359 | 358 | ||
360 | dev->wd_due_counter = !!dev->wd_timeout; | ||
361 | |||
362 | if (watchdog_register_device(&amt_wd_dev)) { | 359 | if (watchdog_register_device(&amt_wd_dev)) { |
363 | dev_err(&dev->pdev->dev, | 360 | dev_err(&dev->pdev->dev, |
364 | "wd: unable to register watchdog device.\n"); | 361 | "wd: unable to register watchdog device.\n"); |