diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2012-11-01 21:17:14 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-01 12:31:19 -0700 |
commit | 3870c3206b96c900ce29c8068bd5ad46fae71f5b (patch) | |
tree | fdf26b80c5b67b758afbe7d1d4814b2f8f56b843 /drivers/misc/mei/iorw.c | |
parent | b0d0cf77e72a9d233015f8f21e9dfc9d9b5d0711 (diff) | |
download | op-kernel-dev-3870c3206b96c900ce29c8068bd5ad46fae71f5b.zip op-kernel-dev-3870c3206b96c900ce29c8068bd5ad46fae71f5b.tar.gz |
mei: normalize timeouts definitions
1. The hardware book defines timeouts in seconds
so we stick to this and define the wrapper function
mei_secs_to_jiffies around msecs_to_jiffies
to use be used instead multiplying by HZ
2. We add name space prefix MEI_ to all timer defines
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/iorw.c')
-rw-r--r-- | drivers/misc/mei/iorw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/misc/mei/iorw.c b/drivers/misc/mei/iorw.c index 541c157..8026cbf 100644 --- a/drivers/misc/mei/iorw.c +++ b/drivers/misc/mei/iorw.c @@ -173,7 +173,7 @@ int mei_ioctl_connect_client(struct file *file, struct mei_cl *cl; struct mei_cl *cl_pos = NULL; struct mei_cl *cl_next = NULL; - long timeout = CONNECT_TIMEOUT; + long timeout = mei_secs_to_jiffies(MEI_CL_CONNECT_TIMEOUT); int i; int err; int rets; @@ -291,8 +291,7 @@ int mei_ioctl_connect_client(struct file *file, mutex_unlock(&dev->device_lock); err = wait_event_timeout(dev->wait_recvd_msg, (MEI_FILE_CONNECTED == cl->state || - MEI_FILE_DISCONNECTED == cl->state), - timeout * HZ); + MEI_FILE_DISCONNECTED == cl->state), timeout); mutex_lock(&dev->device_lock); if (MEI_FILE_CONNECTED == cl->state) { @@ -415,7 +414,8 @@ int amthi_read(struct mei_device *dev, struct file *file, dev->iamthif_timer = 0; if (cb) { - timeout = cb->read_time + msecs_to_jiffies(IAMTHIF_READ_TIMER); + timeout = cb->read_time + + mei_secs_to_jiffies(MEI_IAMTHIF_READ_TIMER); dev_dbg(&dev->pdev->dev, "amthi timeout = %lud\n", timeout); |