summaryrefslogtreecommitdiff
path: root/drivers/misc/mei/wd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/mei/wd.c')
-rw-r--r--drivers/misc/mei/wd.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/drivers/misc/mei/wd.c b/drivers/misc/mei/wd.c
index 40f46e4c2e9c..d28511b78eaa 100644
--- a/drivers/misc/mei/wd.c
+++ b/drivers/misc/mei/wd.c
@@ -42,7 +42,7 @@ const uuid_le mei_wd_guid = UUID_LE(0x05B79A6F, 0x4628, 0x4D7F, 0x89,
static void mei_wd_set_start_timeout(struct mei_device *dev, u16 timeout)
{
- dev_dbg(&dev->pdev->dev, "wd: set timeout=%d.\n", timeout);
+ dev_dbg(dev->dev, "wd: set timeout=%d.\n", timeout);
memcpy(dev->wd_data, mei_start_wd_params, MEI_WD_HDR_SIZE);
memcpy(dev->wd_data + MEI_WD_HDR_SIZE, &timeout, sizeof(u16));
}
@@ -71,7 +71,7 @@ int mei_wd_host_init(struct mei_device *dev)
/* check for valid client id */
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");
+ dev_info(dev->dev, "wd: failed to find the client\n");
return -ENOTTY;
}
@@ -81,14 +81,14 @@ int mei_wd_host_init(struct mei_device *dev)
ret = mei_cl_link(cl, MEI_WD_HOST_CLIENT_ID);
if (ret < 0) {
- dev_info(&dev->pdev->dev, "wd: failed link client\n");
+ dev_info(dev->dev, "wd: failed link client\n");
return ret;
}
ret = mei_cl_connect(cl, NULL);
if (ret) {
- dev_err(&dev->pdev->dev, "wd: failed to connect = %d\n", ret);
+ dev_err(dev->dev, "wd: failed to connect = %d\n", ret);
mei_cl_unlink(cl);
return ret;
}
@@ -128,19 +128,19 @@ int mei_wd_send(struct mei_device *dev)
else if (!memcmp(dev->wd_data, mei_stop_wd_params, MEI_WD_HDR_SIZE))
hdr.length = MEI_WD_STOP_MSG_SIZE;
else {
- dev_err(&dev->pdev->dev, "wd: invalid message is to be sent, aborting\n");
+ dev_err(dev->dev, "wd: invalid message is to be sent, aborting\n");
return -EINVAL;
}
ret = mei_write_message(dev, &hdr, dev->wd_data);
if (ret) {
- dev_err(&dev->pdev->dev, "wd: write message failed\n");
+ dev_err(dev->dev, "wd: write message failed\n");
return ret;
}
ret = mei_cl_flow_ctrl_reduce(cl);
if (ret) {
- dev_err(&dev->pdev->dev, "wd: flow_ctrl_reduce failed.\n");
+ dev_err(dev->dev, "wd: flow_ctrl_reduce failed.\n");
return ret;
}
@@ -193,11 +193,10 @@ int mei_wd_stop(struct mei_device *dev)
if (dev->wd_state != MEI_WD_IDLE) {
/* timeout */
ret = -ETIME;
- dev_warn(&dev->pdev->dev,
- "wd: stop failed to complete ret=%d.\n", ret);
+ dev_warn(dev->dev, "wd: stop failed to complete ret=%d\n", ret);
goto err;
}
- dev_dbg(&dev->pdev->dev, "wd: stop completed after %u msec\n",
+ dev_dbg(dev->dev, "wd: stop completed after %u msec\n",
MEI_WD_STOP_TIMEOUT - jiffies_to_msecs(ret));
return 0;
err:
@@ -223,15 +222,13 @@ static int mei_wd_ops_start(struct watchdog_device *wd_dev)
mutex_lock(&dev->device_lock);
if (dev->dev_state != MEI_DEV_ENABLED) {
- dev_dbg(&dev->pdev->dev,
- "wd: dev_state != MEI_DEV_ENABLED dev_state = %s\n",
+ dev_dbg(dev->dev, "wd: dev_state != MEI_DEV_ENABLED dev_state = %s\n",
mei_dev_state_str(dev->dev_state));
goto end_unlock;
}
if (dev->wd_cl.state != MEI_FILE_CONNECTED) {
- dev_dbg(&dev->pdev->dev,
- "MEI Driver is not connected to Watchdog Client\n");
+ dev_dbg(dev->dev, "MEI Driver is not connected to Watchdog Client\n");
goto end_unlock;
}
@@ -284,7 +281,7 @@ static int mei_wd_ops_ping(struct watchdog_device *wd_dev)
mutex_lock(&dev->device_lock);
if (dev->wd_cl.state != MEI_FILE_CONNECTED) {
- dev_err(&dev->pdev->dev, "wd: not connected.\n");
+ dev_err(dev->dev, "wd: not connected.\n");
ret = -ENODEV;
goto end;
}
@@ -297,7 +294,7 @@ static int mei_wd_ops_ping(struct watchdog_device *wd_dev)
/* Check if we can send the ping to HW*/
if (ret && mei_hbuf_acquire(dev)) {
- dev_dbg(&dev->pdev->dev, "wd: sending ping\n");
+ dev_dbg(dev->dev, "wd: sending ping\n");
ret = mei_wd_send(dev);
if (ret)
@@ -380,13 +377,12 @@ int mei_watchdog_register(struct mei_device *dev)
ret = watchdog_register_device(&amt_wd_dev);
mutex_lock(&dev->device_lock);
if (ret) {
- dev_err(&dev->pdev->dev, "wd: unable to register watchdog device = %d.\n",
+ dev_err(dev->dev, "wd: unable to register watchdog device = %d.\n",
ret);
return ret;
}
- dev_dbg(&dev->pdev->dev,
- "wd: successfully register watchdog interface.\n");
+ dev_dbg(dev->dev, "wd: successfully register watchdog interface.\n");
watchdog_set_drvdata(&amt_wd_dev, dev);
return 0;
}