summaryrefslogtreecommitdiff
path: root/drivers/staging/mei
diff options
context:
space:
mode:
authorOren Weil <oren.jer.weil@intel.com>2011-09-07 09:03:15 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-09 13:28:21 -0700
commit2ad64ba8ea55319ddc3c7534e77a4abee5d6fa43 (patch)
tree45f2fa5194ac9a3ecc5d415aedc50447045be2aa /drivers/staging/mei
parent6d70e935596a51742ecc899b3d9629f11e506522 (diff)
staging: mei: client init code cleanup
starting removing the dependency from the module parameters. setting the default timeout on init so don't need to check if it is bigger then zero. Signed-off-by: Oren Weil <oren.jer.weil@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/mei')
-rw-r--r--drivers/staging/mei/wd.c37
1 files changed, 15 insertions, 22 deletions
diff --git a/drivers/staging/mei/wd.c b/drivers/staging/mei/wd.c
index 68c177be7e4..fd679524f38 100644
--- a/drivers/staging/mei/wd.c
+++ b/drivers/staging/mei/wd.c
@@ -72,32 +72,25 @@ bool mei_wd_host_init(struct mei_device *dev)
/* look for WD client and connect to it */
dev->wd_cl.state = MEI_FILE_DISCONNECTED;
- dev->wd_timeout = watchdog_timeout;
-
- if (dev->wd_timeout > 0) {
- /* find ME WD client */
- mei_find_me_client_update_filext(dev, &dev->wd_cl,
- &mei_wd_guid, MEI_WD_HOST_CLIENT_ID);
-
- dev_dbg(&dev->pdev->dev, "check wd_cl\n");
- if (MEI_FILE_CONNECTING == dev->wd_cl.state) {
- if (!mei_connect(dev, &dev->wd_cl)) {
- dev_dbg(&dev->pdev->dev, "Failed to connect to WD client\n");
- dev->wd_cl.state = MEI_FILE_DISCONNECTED;
- dev->wd_cl.host_client_id = 0;
- ret = false;
- goto end;
- } else {
- dev->wd_cl.timer_count = CONNECT_TIMEOUT;
- }
- } else {
- dev_dbg(&dev->pdev->dev, "Failed to find WD client\n");
+ dev->wd_timeout = AMT_WD_DEFAULT_TIMEOUT;
+
+ /* find ME WD client */
+ mei_find_me_client_update_filext(dev, &dev->wd_cl,
+ &mei_wd_guid, MEI_WD_HOST_CLIENT_ID);
+
+ dev_dbg(&dev->pdev->dev, "check wd_cl\n");
+ if (MEI_FILE_CONNECTING == dev->wd_cl.state) {
+ if (!mei_connect(dev, &dev->wd_cl)) {
+ dev_dbg(&dev->pdev->dev, "Failed to connect to WD client\n");
+ dev->wd_cl.state = MEI_FILE_DISCONNECTED;
+ dev->wd_cl.host_client_id = 0;
ret = false;
goto end;
+ } else {
+ dev->wd_cl.timer_count = CONNECT_TIMEOUT;
}
} else {
- dev->wd_bypass = true;
- dev_dbg(&dev->pdev->dev, "WD requested to be disabled\n");
+ dev_dbg(&dev->pdev->dev, "Failed to find WD client\n");
ret = false;
goto end;
}