diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2014-10-02 06:39:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-03 18:52:48 -0500 |
commit | 3d32cf02241e307d3be92046a8cbd3deb8cda307 (patch) | |
tree | e0b12181bf21fa86306ff5f352be0a9aadf9984b /drivers/misc/mei/wd.c | |
parent | 140c7553231dcd119ebda8c27dec7f06aef7e323 (diff) |
mei: use local cl variables in wd and amthif
Use local cl variable instead of dev->iamthif_cl and dev->wd_cl
as the first step to use dynamic allocation of these clients
as their are not supported on all platforms
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.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/misc/mei/wd.c b/drivers/misc/mei/wd.c index b836dfffceb5..b1d892cea94d 100644 --- a/drivers/misc/mei/wd.c +++ b/drivers/misc/mei/wd.c | |||
@@ -270,15 +270,18 @@ static int mei_wd_ops_stop(struct watchdog_device *wd_dev) | |||
270 | static int mei_wd_ops_ping(struct watchdog_device *wd_dev) | 270 | static int mei_wd_ops_ping(struct watchdog_device *wd_dev) |
271 | { | 271 | { |
272 | struct mei_device *dev; | 272 | struct mei_device *dev; |
273 | struct mei_cl *cl; | ||
273 | int ret; | 274 | int ret; |
274 | 275 | ||
275 | dev = watchdog_get_drvdata(wd_dev); | 276 | dev = watchdog_get_drvdata(wd_dev); |
276 | if (!dev) | 277 | if (!dev) |
277 | return -ENODEV; | 278 | return -ENODEV; |
278 | 279 | ||
280 | cl = &dev->wd_cl; | ||
281 | |||
279 | mutex_lock(&dev->device_lock); | 282 | mutex_lock(&dev->device_lock); |
280 | 283 | ||
281 | if (dev->wd_cl.state != MEI_FILE_CONNECTED) { | 284 | if (cl->state != MEI_FILE_CONNECTED) { |
282 | dev_err(dev->dev, "wd: not connected.\n"); | 285 | dev_err(dev->dev, "wd: not connected.\n"); |
283 | ret = -ENODEV; | 286 | ret = -ENODEV; |
284 | goto end; | 287 | goto end; |
@@ -286,12 +289,12 @@ static int mei_wd_ops_ping(struct watchdog_device *wd_dev) | |||
286 | 289 | ||
287 | dev->wd_state = MEI_WD_RUNNING; | 290 | dev->wd_state = MEI_WD_RUNNING; |
288 | 291 | ||
289 | ret = mei_cl_flow_ctrl_creds(&dev->wd_cl); | 292 | ret = mei_cl_flow_ctrl_creds(cl); |
290 | if (ret < 0) | 293 | if (ret < 0) |
291 | goto end; | 294 | goto end; |
295 | |||
292 | /* Check if we can send the ping to HW*/ | 296 | /* Check if we can send the ping to HW*/ |
293 | if (ret && mei_hbuf_acquire(dev)) { | 297 | if (ret && mei_hbuf_acquire(dev)) { |
294 | |||
295 | dev_dbg(dev->dev, "wd: sending ping\n"); | 298 | dev_dbg(dev->dev, "wd: sending ping\n"); |
296 | 299 | ||
297 | ret = mei_wd_send(dev); | 300 | ret = mei_wd_send(dev); |