diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2013-01-08 16:07:14 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-08 19:40:44 -0500 |
commit | 90e0b5f18569bdd03c5ddd1d8c99946f42af77b8 (patch) | |
tree | 2d70ede445345397032a92fe9f5e24eb8d3c4981 /drivers/misc/mei/wd.c | |
parent | 9ca9050b3df690d9d44e39424ab2a531120af936 (diff) |
mei: fix client functions names
Use common prefix for function names:
mei_cl_ - for host clients
mei_me_ - for me clients
mei_io_ - for io callback functions
Because mei_cl holds mei_device back pointer
we can also drop the dev argument from the client
functions
add client.h header to export the clients API
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 | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/misc/mei/wd.c b/drivers/misc/mei/wd.c index 9814bc1dba01..5ad5225ea2b9 100644 --- a/drivers/misc/mei/wd.c +++ b/drivers/misc/mei/wd.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "mei_dev.h" | 26 | #include "mei_dev.h" |
27 | #include "hbm.h" | 27 | #include "hbm.h" |
28 | #include "interface.h" | 28 | #include "interface.h" |
29 | #include "client.h" | ||
29 | 30 | ||
30 | static const u8 mei_start_wd_params[] = { 0x02, 0x12, 0x13, 0x10 }; | 31 | static const u8 mei_start_wd_params[] = { 0x02, 0x12, 0x13, 0x10 }; |
31 | static const u8 mei_stop_wd_params[] = { 0x02, 0x02, 0x14, 0x10 }; | 32 | static const u8 mei_stop_wd_params[] = { 0x02, 0x02, 0x14, 0x10 }; |
@@ -72,7 +73,7 @@ int mei_wd_host_init(struct mei_device *dev) | |||
72 | dev->wd_state = MEI_WD_IDLE; | 73 | dev->wd_state = MEI_WD_IDLE; |
73 | 74 | ||
74 | /* Connect WD ME client to the host client */ | 75 | /* Connect WD ME client to the host client */ |
75 | id = mei_me_cl_link(dev, &dev->wd_cl, | 76 | id = mei_cl_link_me(&dev->wd_cl, |
76 | &mei_wd_guid, MEI_WD_HOST_CLIENT_ID); | 77 | &mei_wd_guid, MEI_WD_HOST_CLIENT_ID); |
77 | 78 | ||
78 | if (id < 0) { | 79 | if (id < 0) { |
@@ -141,7 +142,7 @@ int mei_wd_stop(struct mei_device *dev) | |||
141 | 142 | ||
142 | dev->wd_state = MEI_WD_STOPPING; | 143 | dev->wd_state = MEI_WD_STOPPING; |
143 | 144 | ||
144 | ret = mei_flow_ctrl_creds(dev, &dev->wd_cl); | 145 | ret = mei_cl_flow_ctrl_creds(&dev->wd_cl); |
145 | if (ret < 0) | 146 | if (ret < 0) |
146 | goto out; | 147 | goto out; |
147 | 148 | ||
@@ -150,7 +151,7 @@ int mei_wd_stop(struct mei_device *dev) | |||
150 | dev->mei_host_buffer_is_empty = false; | 151 | dev->mei_host_buffer_is_empty = false; |
151 | 152 | ||
152 | if (!mei_wd_send(dev)) { | 153 | if (!mei_wd_send(dev)) { |
153 | ret = mei_flow_ctrl_reduce(dev, &dev->wd_cl); | 154 | ret = mei_cl_flow_ctrl_reduce(&dev->wd_cl); |
154 | if (ret) | 155 | if (ret) |
155 | goto out; | 156 | goto out; |
156 | } else { | 157 | } else { |
@@ -271,7 +272,7 @@ static int mei_wd_ops_ping(struct watchdog_device *wd_dev) | |||
271 | 272 | ||
272 | /* Check if we can send the ping to HW*/ | 273 | /* Check if we can send the ping to HW*/ |
273 | if (dev->mei_host_buffer_is_empty && | 274 | if (dev->mei_host_buffer_is_empty && |
274 | mei_flow_ctrl_creds(dev, &dev->wd_cl) > 0) { | 275 | mei_cl_flow_ctrl_creds(&dev->wd_cl) > 0) { |
275 | 276 | ||
276 | dev->mei_host_buffer_is_empty = false; | 277 | dev->mei_host_buffer_is_empty = false; |
277 | dev_dbg(&dev->pdev->dev, "wd: sending ping\n"); | 278 | dev_dbg(&dev->pdev->dev, "wd: sending ping\n"); |
@@ -282,9 +283,9 @@ static int mei_wd_ops_ping(struct watchdog_device *wd_dev) | |||
282 | goto end; | 283 | goto end; |
283 | } | 284 | } |
284 | 285 | ||
285 | if (mei_flow_ctrl_reduce(dev, &dev->wd_cl)) { | 286 | if (mei_cl_flow_ctrl_reduce(&dev->wd_cl)) { |
286 | dev_err(&dev->pdev->dev, | 287 | dev_err(&dev->pdev->dev, |
287 | "wd: mei_flow_ctrl_reduce() failed.\n"); | 288 | "wd: mei_cl_flow_ctrl_reduce() failed.\n"); |
288 | ret = -EIO; | 289 | ret = -EIO; |
289 | goto end; | 290 | goto end; |
290 | } | 291 | } |