Commit 2ad64ba8 authored by Oren Weil's avatar Oren Weil Committed by Greg Kroah-Hartman

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: default avatarOren Weil <oren.jer.weil@intel.com>
Acked-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6d70e935
...@@ -72,32 +72,25 @@ bool mei_wd_host_init(struct mei_device *dev) ...@@ -72,32 +72,25 @@ bool mei_wd_host_init(struct mei_device *dev)
/* look for WD client and connect to it */ /* look for WD client and connect to it */
dev->wd_cl.state = MEI_FILE_DISCONNECTED; dev->wd_cl.state = MEI_FILE_DISCONNECTED;
dev->wd_timeout = watchdog_timeout; dev->wd_timeout = AMT_WD_DEFAULT_TIMEOUT;
if (dev->wd_timeout > 0) { /* find ME WD client */
/* find ME WD client */ mei_find_me_client_update_filext(dev, &dev->wd_cl,
mei_find_me_client_update_filext(dev, &dev->wd_cl, &mei_wd_guid, MEI_WD_HOST_CLIENT_ID);
&mei_wd_guid, MEI_WD_HOST_CLIENT_ID);
dev_dbg(&dev->pdev->dev, "check wd_cl\n");
dev_dbg(&dev->pdev->dev, "check wd_cl\n"); if (MEI_FILE_CONNECTING == dev->wd_cl.state) {
if (MEI_FILE_CONNECTING == dev->wd_cl.state) { if (!mei_connect(dev, &dev->wd_cl)) {
if (!mei_connect(dev, &dev->wd_cl)) { dev_dbg(&dev->pdev->dev, "Failed to connect to WD client\n");
dev_dbg(&dev->pdev->dev, "Failed to connect to WD client\n"); dev->wd_cl.state = MEI_FILE_DISCONNECTED;
dev->wd_cl.state = MEI_FILE_DISCONNECTED; dev->wd_cl.host_client_id = 0;
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");
ret = false; ret = false;
goto end; goto end;
} else {
dev->wd_cl.timer_count = CONNECT_TIMEOUT;
} }
} else { } else {
dev->wd_bypass = true; dev_dbg(&dev->pdev->dev, "Failed to find WD client\n");
dev_dbg(&dev->pdev->dev, "WD requested to be disabled\n");
ret = false; ret = false;
goto end; goto end;
} }
......
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