aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorFrode Isaksen <fisaksex@intel.com>2013-06-23 02:37:01 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-24 19:32:31 -0400
commit206ecfc21121aa272f3f9fa23e1ed252a12e8a5c (patch)
treed959cf8356b78fe9edcf7a4d2d588403f1a66573 /drivers/misc
parent4dfaa9f7020b1ff4bf87899f4797d2efd76e80fd (diff)
mei: mei_cl_connect: don't multiply the timeout twice
MEI_CL_CONNECT_TIMEOUT is the timeout in seconds to wait for a response in mei_cl_connect. The value was converted to jiffies using mei_secs_to_jiffies helper function and assigned to a local variable which is by mistake again multiplied by HZ Signed-off-by: Frode Isaksen <frodex.isaksen@intel.com> 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/client.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 11a465a25896..21d3f5aa8353 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -485,7 +485,6 @@ int mei_cl_connect(struct mei_cl *cl, struct file *file)
485{ 485{
486 struct mei_device *dev; 486 struct mei_device *dev;
487 struct mei_cl_cb *cb; 487 struct mei_cl_cb *cb;
488 long timeout = mei_secs_to_jiffies(MEI_CL_CONNECT_TIMEOUT);
489 int rets; 488 int rets;
490 489
491 if (WARN_ON(!cl || !cl->dev)) 490 if (WARN_ON(!cl || !cl->dev))
@@ -518,7 +517,7 @@ int mei_cl_connect(struct mei_cl *cl, struct file *file)
518 rets = wait_event_timeout(dev->wait_recvd_msg, 517 rets = wait_event_timeout(dev->wait_recvd_msg,
519 (cl->state == MEI_FILE_CONNECTED || 518 (cl->state == MEI_FILE_CONNECTED ||
520 cl->state == MEI_FILE_DISCONNECTED), 519 cl->state == MEI_FILE_DISCONNECTED),
521 timeout * HZ); 520 mei_secs_to_jiffies(MEI_CL_CONNECT_TIMEOUT));
522 mutex_lock(&dev->device_lock); 521 mutex_lock(&dev->device_lock);
523 522
524 if (cl->state != MEI_FILE_CONNECTED) { 523 if (cl->state != MEI_FILE_CONNECTED) {