aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/wd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-14 19:43:47 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-14 19:43:47 -0500
commit6ae840e7cc4be0be3aa40d9f67c35c75cfc67d83 (patch)
tree9c83c87a8670ef678d95f8d6f76a07f24a09a49f /drivers/misc/mei/wd.c
parente6b5be2be4e30037eb551e0ed09dd97bd00d85d3 (diff)
parent91905b6f4afe51e23a3f58df93e4cdc5e49cf40c (diff)
Merge tag 'char-misc-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH: "Here's the big char/misc driver update for 3.19-rc1 Lots of little things all over the place in different drivers, and a new subsystem, "coresight" has been added. Full details are in the shortlog" * tag 'char-misc-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (73 commits) parport: parport_pc, do not remove parent devices early spmi: Remove shutdown/suspend/resume kernel-doc carma-fpga-program: drop videobuf dependency carma-fpga: drop videobuf dependency carma-fpga-program.c: fix compile errors i8k: Fix temperature bug handling in i8k_get_temp() cxl: Name interrupts in /proc/interrupt CXL: Return error to PSL if IRQ demultiplexing fails & print clearer warning coresight-replicator: remove .owner field for driver coresight: fixed comments in coresight.h coresight: fix typo in comment in coresight-priv.h coresight: bindings for coresight drivers coresight: Adding ABI documentation w1: support auto-load of w1_bq27000 module. w1: avoid potential u16 overflow cn: verify msg->len before making callback mei: export fw status registers through sysfs mei: read and print all six FW status registers mei: txe: add cherrytrail device id mei: kill cached host and me csr values ...
Diffstat (limited to 'drivers/misc/mei/wd.c')
-rw-r--r--drivers/misc/mei/wd.c9
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)
270static int mei_wd_ops_ping(struct watchdog_device *wd_dev) 270static 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);