Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304253
b: refs/heads/master
c: 9487eb0
h: refs/heads/master
i:
  304251: 7f042b1
v: v3
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Apr 10, 2012
1 parent 386432c commit e3599f7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c38ea24e22e8c416d4a2b13355a546b5916ae296
refs/heads/master: 9487eb0a1588b8d759f7231c7aa44893525769b2
2 changes: 1 addition & 1 deletion trunk/drivers/staging/mei/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int mei_flow_ctrl_creds(struct mei_device *dev, struct mei_cl *cl);

int mei_wd_send(struct mei_device *dev);
int mei_wd_stop(struct mei_device *dev, bool preserve);
bool mei_wd_host_init(struct mei_device *dev);
int mei_wd_host_init(struct mei_device *dev);
/*
* mei_watchdog_register - Registering watchdog interface
* once we got connection to the WD Client
Expand Down
36 changes: 16 additions & 20 deletions trunk/drivers/staging/mei/wd.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ static void mei_wd_set_start_timeout(struct mei_device *dev, u16 timeout)
* host_init_wd - mei initialization wd.
*
* @dev: the device structure
* returns -ENENT if wd client cannot be found
* -EIO if write has failed
*/
bool mei_wd_host_init(struct mei_device *dev)
int mei_wd_host_init(struct mei_device *dev)
{
bool ret = false;

mei_cl_init(&dev->wd_cl, dev);

/* look for WD client and connect to it */
Expand All @@ -71,25 +71,21 @@ bool mei_wd_host_init(struct mei_device *dev)
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");
ret = false;
goto end;
dev_dbg(&dev->pdev->dev, "wd: check client\n");
if (MEI_FILE_CONNECTING != dev->wd_cl.state) {
dev_info(&dev->pdev->dev, "wd: failed to find the client\n");
return -ENOENT;
}

end:
return ret;
if (mei_connect(dev, &dev->wd_cl)) {
dev_err(&dev->pdev->dev, "wd: failed to connect to the client\n");
dev->wd_cl.state = MEI_FILE_DISCONNECTED;
dev->wd_cl.host_client_id = 0;
return -EIO;
}
dev->wd_cl.timer_count = CONNECT_TIMEOUT;

return 0;
}

/**
Expand Down

0 comments on commit e3599f7

Please sign in to comment.