summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/wd.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2014-08-24 12:08:55 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-23 22:57:47 -0700
commitd320832f64666089a06778782e42fac29abd7bf7 (patch)
tree19fd44ea6cd1b93a178763345a736f193284132f /drivers/misc/mei/wd.c
parent68d1aa65978b86b2ca5bdf7211b27cfd32c3212d (diff)
downloadlinux-d320832f64666089a06778782e42fac29abd7bf7.tar.gz
linux-d320832f64666089a06778782e42fac29abd7bf7.tar.bz2
linux-d320832f64666089a06778782e42fac29abd7bf7.zip
mei: me_client lookup function to return me_client object
For support of dynamic addition and removal of me clients it is more convenient to use a list instead of static array as is use now. As the first step of the transition to the new data structure we change the lookup function so it returns me client address instead of an index. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/wd.c')
-rw-r--r--drivers/misc/mei/wd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/misc/mei/wd.c b/drivers/misc/mei/wd.c
index a84a664dfccb..8b241eef35d2 100644
--- a/drivers/misc/mei/wd.c
+++ b/drivers/misc/mei/wd.c
@@ -59,7 +59,7 @@ static void mei_wd_set_start_timeout(struct mei_device *dev, u16 timeout)
int mei_wd_host_init(struct mei_device *dev)
{
struct mei_cl *cl = &dev->wd_cl;
- int id;
+ struct mei_me_client *me_cl;
int ret;
mei_cl_init(cl, dev);
@@ -69,13 +69,13 @@ int mei_wd_host_init(struct mei_device *dev)
/* check for valid client id */
- id = mei_me_cl_by_uuid(dev, &mei_wd_guid);
- if (id < 0) {
+ me_cl = mei_me_cl_by_uuid(dev, &mei_wd_guid);
+ if (!me_cl) {
dev_info(&dev->pdev->dev, "wd: failed to find the client\n");
return -ENOTTY;
}
- cl->me_client_id = dev->me_clients[id].client_id;
+ cl->me_client_id = me_cl->client_id;
ret = mei_cl_link(cl, MEI_WD_HOST_CLIENT_ID);