diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2015-09-10 03:18:05 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-20 22:31:10 -0400 |
commit | d49dc5e76fc917e5dfef76cb56fe3b3868deed5d (patch) | |
tree | 2b1a074aca8d31ce13dbccaf5dea0c7675cd4dfe | |
parent | 893913822e829f7a37824f6041ff964076374191 (diff) |
mei: bus: use mei_cldev_ prefix for the API functions
Use mei_cldev_ prefix for all mei client bus api functions
in order to resolve prefix conflict with functions that handle
client function and are defined in client.c
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/misc/mei/bus.c | 67 | ||||
-rw-r--r-- | drivers/nfc/mei_phy.c | 25 | ||||
-rw-r--r-- | drivers/nfc/microread/mei.c | 6 | ||||
-rw-r--r-- | drivers/nfc/pn544/mei.c | 6 | ||||
-rw-r--r-- | include/linux/mei_cl_bus.h | 33 |
5 files changed, 70 insertions, 67 deletions
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index 4edf71acfed6..0406e7201fe4 100644 --- a/drivers/misc/mei/bus.c +++ b/drivers/misc/mei/bus.c | |||
@@ -165,7 +165,7 @@ out: | |||
165 | } | 165 | } |
166 | 166 | ||
167 | /** | 167 | /** |
168 | * mei_cl_send - me device send (write) | 168 | * mei_cldev_send - me device send (write) |
169 | * | 169 | * |
170 | * @cldev: me client device | 170 | * @cldev: me client device |
171 | * @buf: buffer to send | 171 | * @buf: buffer to send |
@@ -173,7 +173,7 @@ out: | |||
173 | * | 173 | * |
174 | * Return: written size in bytes or < 0 on error | 174 | * Return: written size in bytes or < 0 on error |
175 | */ | 175 | */ |
176 | ssize_t mei_cl_send(struct mei_cl_device *cldev, u8 *buf, size_t length) | 176 | ssize_t mei_cldev_send(struct mei_cl_device *cldev, u8 *buf, size_t length) |
177 | { | 177 | { |
178 | struct mei_cl *cl = cldev->cl; | 178 | struct mei_cl *cl = cldev->cl; |
179 | 179 | ||
@@ -182,10 +182,10 @@ ssize_t mei_cl_send(struct mei_cl_device *cldev, u8 *buf, size_t length) | |||
182 | 182 | ||
183 | return __mei_cl_send(cl, buf, length, 1); | 183 | return __mei_cl_send(cl, buf, length, 1); |
184 | } | 184 | } |
185 | EXPORT_SYMBOL_GPL(mei_cl_send); | 185 | EXPORT_SYMBOL_GPL(mei_cldev_send); |
186 | 186 | ||
187 | /** | 187 | /** |
188 | * mei_cl_recv - client receive (read) | 188 | * mei_cldev_recv - client receive (read) |
189 | * | 189 | * |
190 | * @cldev: me client device | 190 | * @cldev: me client device |
191 | * @buf: buffer to send | 191 | * @buf: buffer to send |
@@ -193,7 +193,7 @@ EXPORT_SYMBOL_GPL(mei_cl_send); | |||
193 | * | 193 | * |
194 | * Return: read size in bytes of < 0 on error | 194 | * Return: read size in bytes of < 0 on error |
195 | */ | 195 | */ |
196 | ssize_t mei_cl_recv(struct mei_cl_device *cldev, u8 *buf, size_t length) | 196 | ssize_t mei_cldev_recv(struct mei_cl_device *cldev, u8 *buf, size_t length) |
197 | { | 197 | { |
198 | struct mei_cl *cl = cldev->cl; | 198 | struct mei_cl *cl = cldev->cl; |
199 | 199 | ||
@@ -202,15 +202,15 @@ ssize_t mei_cl_recv(struct mei_cl_device *cldev, u8 *buf, size_t length) | |||
202 | 202 | ||
203 | return __mei_cl_recv(cl, buf, length); | 203 | return __mei_cl_recv(cl, buf, length); |
204 | } | 204 | } |
205 | EXPORT_SYMBOL_GPL(mei_cl_recv); | 205 | EXPORT_SYMBOL_GPL(mei_cldev_recv); |
206 | 206 | ||
207 | /** | 207 | /** |
208 | * mei_bus_event_work - dispatch rx event for a bus device | 208 | * mei_cl_bus_event_work - dispatch rx event for a bus device |
209 | * and schedule new work | 209 | * and schedule new work |
210 | * | 210 | * |
211 | * @work: work | 211 | * @work: work |
212 | */ | 212 | */ |
213 | static void mei_bus_event_work(struct work_struct *work) | 213 | static void mei_cl_bus_event_work(struct work_struct *work) |
214 | { | 214 | { |
215 | struct mei_cl_device *cldev; | 215 | struct mei_cl_device *cldev; |
216 | 216 | ||
@@ -272,7 +272,7 @@ void mei_cl_bus_rx_event(struct mei_cl *cl) | |||
272 | } | 272 | } |
273 | 273 | ||
274 | /** | 274 | /** |
275 | * mei_cl_register_event_cb - register event callback | 275 | * mei_cldev_register_event_cb - register event callback |
276 | * | 276 | * |
277 | * @cldev: me client devices | 277 | * @cldev: me client devices |
278 | * @event_cb: callback function | 278 | * @event_cb: callback function |
@@ -283,9 +283,9 @@ void mei_cl_bus_rx_event(struct mei_cl *cl) | |||
283 | * -EALREADY if an callback is already registered | 283 | * -EALREADY if an callback is already registered |
284 | * <0 on other errors | 284 | * <0 on other errors |
285 | */ | 285 | */ |
286 | int mei_cl_register_event_cb(struct mei_cl_device *cldev, | 286 | int mei_cldev_register_event_cb(struct mei_cl_device *cldev, |
287 | unsigned long events_mask, | 287 | unsigned long events_mask, |
288 | mei_cl_event_cb_t event_cb, void *context) | 288 | mei_cldev_event_cb_t event_cb, void *context) |
289 | { | 289 | { |
290 | int ret; | 290 | int ret; |
291 | 291 | ||
@@ -296,7 +296,7 @@ int mei_cl_register_event_cb(struct mei_cl_device *cldev, | |||
296 | cldev->events_mask = events_mask; | 296 | cldev->events_mask = events_mask; |
297 | cldev->event_cb = event_cb; | 297 | cldev->event_cb = event_cb; |
298 | cldev->event_context = context; | 298 | cldev->event_context = context; |
299 | INIT_WORK(&cldev->event_work, mei_bus_event_work); | 299 | INIT_WORK(&cldev->event_work, mei_cl_bus_event_work); |
300 | 300 | ||
301 | if (cldev->events_mask & BIT(MEI_CL_EVENT_RX)) { | 301 | if (cldev->events_mask & BIT(MEI_CL_EVENT_RX)) { |
302 | ret = mei_cl_read_start(cldev->cl, 0, NULL); | 302 | ret = mei_cl_read_start(cldev->cl, 0, NULL); |
@@ -314,32 +314,32 @@ int mei_cl_register_event_cb(struct mei_cl_device *cldev, | |||
314 | 314 | ||
315 | return 0; | 315 | return 0; |
316 | } | 316 | } |
317 | EXPORT_SYMBOL_GPL(mei_cl_register_event_cb); | 317 | EXPORT_SYMBOL_GPL(mei_cldev_register_event_cb); |
318 | 318 | ||
319 | /** | 319 | /** |
320 | * mei_cl_get_drvdata - driver data getter | 320 | * mei_cldev_get_drvdata - driver data getter |
321 | * | 321 | * |
322 | * @cldev: mei client device | 322 | * @cldev: mei client device |
323 | * | 323 | * |
324 | * Return: driver private data | 324 | * Return: driver private data |
325 | */ | 325 | */ |
326 | void *mei_cl_get_drvdata(const struct mei_cl_device *cldev) | 326 | void *mei_cldev_get_drvdata(const struct mei_cl_device *cldev) |
327 | { | 327 | { |
328 | return dev_get_drvdata(&cldev->dev); | 328 | return dev_get_drvdata(&cldev->dev); |
329 | } | 329 | } |
330 | EXPORT_SYMBOL_GPL(mei_cl_get_drvdata); | 330 | EXPORT_SYMBOL_GPL(mei_cldev_get_drvdata); |
331 | 331 | ||
332 | /** | 332 | /** |
333 | * mei_cl_set_drvdata - driver data setter | 333 | * mei_cldev_set_drvdata - driver data setter |
334 | * | 334 | * |
335 | * @cldev: mei client device | 335 | * @cldev: mei client device |
336 | * @data: data to store | 336 | * @data: data to store |
337 | */ | 337 | */ |
338 | void mei_cl_set_drvdata(struct mei_cl_device *cldev, void *data) | 338 | void mei_cldev_set_drvdata(struct mei_cl_device *cldev, void *data) |
339 | { | 339 | { |
340 | dev_set_drvdata(&cldev->dev, data); | 340 | dev_set_drvdata(&cldev->dev, data); |
341 | } | 341 | } |
342 | EXPORT_SYMBOL_GPL(mei_cl_set_drvdata); | 342 | EXPORT_SYMBOL_GPL(mei_cldev_set_drvdata); |
343 | 343 | ||
344 | /** | 344 | /** |
345 | * mei_cldev_uuid - return uuid of the underlying me client | 345 | * mei_cldev_uuid - return uuid of the underlying me client |
@@ -381,14 +381,14 @@ bool mei_cldev_enabled(struct mei_cl_device *cldev) | |||
381 | EXPORT_SYMBOL_GPL(mei_cldev_enabled); | 381 | EXPORT_SYMBOL_GPL(mei_cldev_enabled); |
382 | 382 | ||
383 | /** | 383 | /** |
384 | * mei_cl_enable_device - enable me client device | 384 | * mei_cldev_enable_device - enable me client device |
385 | * create connection with me client | 385 | * create connection with me client |
386 | * | 386 | * |
387 | * @cldev: me client device | 387 | * @cldev: me client device |
388 | * | 388 | * |
389 | * Return: 0 on success and < 0 on error | 389 | * Return: 0 on success and < 0 on error |
390 | */ | 390 | */ |
391 | int mei_cl_enable_device(struct mei_cl_device *cldev) | 391 | int mei_cldev_enable(struct mei_cl_device *cldev) |
392 | { | 392 | { |
393 | struct mei_device *bus = cldev->bus; | 393 | struct mei_device *bus = cldev->bus; |
394 | struct mei_cl *cl; | 394 | struct mei_cl *cl; |
@@ -428,17 +428,17 @@ out: | |||
428 | 428 | ||
429 | return ret; | 429 | return ret; |
430 | } | 430 | } |
431 | EXPORT_SYMBOL_GPL(mei_cl_enable_device); | 431 | EXPORT_SYMBOL_GPL(mei_cldev_enable); |
432 | 432 | ||
433 | /** | 433 | /** |
434 | * mei_cl_disable_device - disable me client device | 434 | * mei_cldev_disable - disable me client device |
435 | * disconnect form the me client | 435 | * disconnect form the me client |
436 | * | 436 | * |
437 | * @cldev: me client device | 437 | * @cldev: me client device |
438 | * | 438 | * |
439 | * Return: 0 on success and < 0 on error | 439 | * Return: 0 on success and < 0 on error |
440 | */ | 440 | */ |
441 | int mei_cl_disable_device(struct mei_cl_device *cldev) | 441 | int mei_cldev_disable(struct mei_cl_device *cldev) |
442 | { | 442 | { |
443 | struct mei_device *bus; | 443 | struct mei_device *bus; |
444 | struct mei_cl *cl; | 444 | struct mei_cl *cl; |
@@ -476,7 +476,7 @@ out: | |||
476 | mutex_unlock(&bus->device_lock); | 476 | mutex_unlock(&bus->device_lock); |
477 | return err; | 477 | return err; |
478 | } | 478 | } |
479 | EXPORT_SYMBOL_GPL(mei_cl_disable_device); | 479 | EXPORT_SYMBOL_GPL(mei_cldev_disable); |
480 | 480 | ||
481 | /** | 481 | /** |
482 | * mei_cl_device_find - find matching entry in the driver id table | 482 | * mei_cl_device_find - find matching entry in the driver id table |
@@ -663,14 +663,14 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *a, | |||
663 | } | 663 | } |
664 | static DEVICE_ATTR_RO(modalias); | 664 | static DEVICE_ATTR_RO(modalias); |
665 | 665 | ||
666 | static struct attribute *mei_cl_dev_attrs[] = { | 666 | static struct attribute *mei_cldev_attrs[] = { |
667 | &dev_attr_name.attr, | 667 | &dev_attr_name.attr, |
668 | &dev_attr_uuid.attr, | 668 | &dev_attr_uuid.attr, |
669 | &dev_attr_version.attr, | 669 | &dev_attr_version.attr, |
670 | &dev_attr_modalias.attr, | 670 | &dev_attr_modalias.attr, |
671 | NULL, | 671 | NULL, |
672 | }; | 672 | }; |
673 | ATTRIBUTE_GROUPS(mei_cl_dev); | 673 | ATTRIBUTE_GROUPS(mei_cldev); |
674 | 674 | ||
675 | /** | 675 | /** |
676 | * mei_cl_device_uevent - me client bus uevent handler | 676 | * mei_cl_device_uevent - me client bus uevent handler |
@@ -704,7 +704,7 @@ static int mei_cl_device_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
704 | 704 | ||
705 | static struct bus_type mei_cl_bus_type = { | 705 | static struct bus_type mei_cl_bus_type = { |
706 | .name = "mei", | 706 | .name = "mei", |
707 | .dev_groups = mei_cl_dev_groups, | 707 | .dev_groups = mei_cldev_groups, |
708 | .match = mei_cl_device_match, | 708 | .match = mei_cl_device_match, |
709 | .probe = mei_cl_device_probe, | 709 | .probe = mei_cl_device_probe, |
710 | .remove = mei_cl_device_remove, | 710 | .remove = mei_cl_device_remove, |
@@ -937,7 +937,8 @@ void mei_cl_bus_rescan(struct mei_device *bus) | |||
937 | dev_dbg(bus->dev, "rescan end"); | 937 | dev_dbg(bus->dev, "rescan end"); |
938 | } | 938 | } |
939 | 939 | ||
940 | int __mei_cl_driver_register(struct mei_cl_driver *cldrv, struct module *owner) | 940 | int __mei_cldev_driver_register(struct mei_cl_driver *cldrv, |
941 | struct module *owner) | ||
941 | { | 942 | { |
942 | int err; | 943 | int err; |
943 | 944 | ||
@@ -953,15 +954,15 @@ int __mei_cl_driver_register(struct mei_cl_driver *cldrv, struct module *owner) | |||
953 | 954 | ||
954 | return 0; | 955 | return 0; |
955 | } | 956 | } |
956 | EXPORT_SYMBOL_GPL(__mei_cl_driver_register); | 957 | EXPORT_SYMBOL_GPL(__mei_cldev_driver_register); |
957 | 958 | ||
958 | void mei_cl_driver_unregister(struct mei_cl_driver *cldrv) | 959 | void mei_cldev_driver_unregister(struct mei_cl_driver *cldrv) |
959 | { | 960 | { |
960 | driver_unregister(&cldrv->driver); | 961 | driver_unregister(&cldrv->driver); |
961 | 962 | ||
962 | pr_debug("mei: driver [%s] unregistered\n", cldrv->driver.name); | 963 | pr_debug("mei: driver [%s] unregistered\n", cldrv->driver.name); |
963 | } | 964 | } |
964 | EXPORT_SYMBOL_GPL(mei_cl_driver_unregister); | 965 | EXPORT_SYMBOL_GPL(mei_cldev_driver_unregister); |
965 | 966 | ||
966 | 967 | ||
967 | int __init mei_cl_bus_init(void) | 968 | int __init mei_cl_bus_init(void) |
diff --git a/drivers/nfc/mei_phy.c b/drivers/nfc/mei_phy.c index ecd2a0dce797..83deda4bb4d6 100644 --- a/drivers/nfc/mei_phy.c +++ b/drivers/nfc/mei_phy.c | |||
@@ -118,7 +118,7 @@ static int mei_nfc_if_version(struct nfc_mei_phy *phy) | |||
118 | cmd.sub_command = MEI_NFC_SUBCMD_IF_VERSION; | 118 | cmd.sub_command = MEI_NFC_SUBCMD_IF_VERSION; |
119 | 119 | ||
120 | MEI_DUMP_NFC_HDR("version", &cmd.hdr); | 120 | MEI_DUMP_NFC_HDR("version", &cmd.hdr); |
121 | r = mei_cl_send(phy->cldev, (u8 *)&cmd, sizeof(struct mei_nfc_cmd)); | 121 | r = mei_cldev_send(phy->cldev, (u8 *)&cmd, sizeof(struct mei_nfc_cmd)); |
122 | if (r < 0) { | 122 | if (r < 0) { |
123 | pr_err("Could not send IF version cmd\n"); | 123 | pr_err("Could not send IF version cmd\n"); |
124 | return r; | 124 | return r; |
@@ -132,7 +132,7 @@ static int mei_nfc_if_version(struct nfc_mei_phy *phy) | |||
132 | if (!reply) | 132 | if (!reply) |
133 | return -ENOMEM; | 133 | return -ENOMEM; |
134 | 134 | ||
135 | bytes_recv = mei_cl_recv(phy->cldev, (u8 *)reply, if_version_length); | 135 | bytes_recv = mei_cldev_recv(phy->cldev, (u8 *)reply, if_version_length); |
136 | if (bytes_recv < 0 || bytes_recv < sizeof(struct mei_nfc_reply)) { | 136 | if (bytes_recv < 0 || bytes_recv < sizeof(struct mei_nfc_reply)) { |
137 | pr_err("Could not read IF version\n"); | 137 | pr_err("Could not read IF version\n"); |
138 | r = -EIO; | 138 | r = -EIO; |
@@ -186,13 +186,14 @@ static int mei_nfc_connect(struct nfc_mei_phy *phy) | |||
186 | connect->vendor_id = phy->vendor_id; | 186 | connect->vendor_id = phy->vendor_id; |
187 | 187 | ||
188 | MEI_DUMP_NFC_HDR("connect request", &cmd->hdr); | 188 | MEI_DUMP_NFC_HDR("connect request", &cmd->hdr); |
189 | r = mei_cl_send(phy->cldev, (u8 *)cmd, connect_length); | 189 | r = mei_cldev_send(phy->cldev, (u8 *)cmd, connect_length); |
190 | if (r < 0) { | 190 | if (r < 0) { |
191 | pr_err("Could not send connect cmd %d\n", r); | 191 | pr_err("Could not send connect cmd %d\n", r); |
192 | goto err; | 192 | goto err; |
193 | } | 193 | } |
194 | 194 | ||
195 | bytes_recv = mei_cl_recv(phy->cldev, (u8 *)reply, connect_resp_length); | 195 | bytes_recv = mei_cldev_recv(phy->cldev, (u8 *)reply, |
196 | connect_resp_length); | ||
196 | if (bytes_recv < 0) { | 197 | if (bytes_recv < 0) { |
197 | r = bytes_recv; | 198 | r = bytes_recv; |
198 | pr_err("Could not read connect response %d\n", r); | 199 | pr_err("Could not read connect response %d\n", r); |
@@ -238,7 +239,7 @@ static int mei_nfc_send(struct nfc_mei_phy *phy, u8 *buf, size_t length) | |||
238 | MEI_DUMP_NFC_HDR("send", hdr); | 239 | MEI_DUMP_NFC_HDR("send", hdr); |
239 | 240 | ||
240 | memcpy(mei_buf + MEI_NFC_HEADER_SIZE, buf, length); | 241 | memcpy(mei_buf + MEI_NFC_HEADER_SIZE, buf, length); |
241 | err = mei_cl_send(phy->cldev, mei_buf, length + MEI_NFC_HEADER_SIZE); | 242 | err = mei_cldev_send(phy->cldev, mei_buf, length + MEI_NFC_HEADER_SIZE); |
242 | if (err < 0) | 243 | if (err < 0) |
243 | goto out; | 244 | goto out; |
244 | 245 | ||
@@ -278,7 +279,7 @@ static int mei_nfc_recv(struct nfc_mei_phy *phy, u8 *buf, size_t length) | |||
278 | struct mei_nfc_hdr *hdr; | 279 | struct mei_nfc_hdr *hdr; |
279 | int received_length; | 280 | int received_length; |
280 | 281 | ||
281 | received_length = mei_cl_recv(phy->cldev, buf, length); | 282 | received_length = mei_cldev_recv(phy->cldev, buf, length); |
282 | if (received_length < 0) | 283 | if (received_length < 0) |
283 | return received_length; | 284 | return received_length; |
284 | 285 | ||
@@ -337,7 +338,7 @@ static int nfc_mei_phy_enable(void *phy_id) | |||
337 | if (phy->powered == 1) | 338 | if (phy->powered == 1) |
338 | return 0; | 339 | return 0; |
339 | 340 | ||
340 | r = mei_cl_enable_device(phy->cldev); | 341 | r = mei_cldev_enable(phy->cldev); |
341 | if (r < 0) { | 342 | if (r < 0) { |
342 | pr_err("Could not enable device %d\n", r); | 343 | pr_err("Could not enable device %d\n", r); |
343 | return r; | 344 | return r; |
@@ -355,7 +356,7 @@ static int nfc_mei_phy_enable(void *phy_id) | |||
355 | goto err; | 356 | goto err; |
356 | } | 357 | } |
357 | 358 | ||
358 | r = mei_cl_register_event_cb(phy->cldev, BIT(MEI_CL_EVENT_RX), | 359 | r = mei_cldev_register_event_cb(phy->cldev, BIT(MEI_CL_EVENT_RX), |
359 | nfc_mei_event_cb, phy); | 360 | nfc_mei_event_cb, phy); |
360 | if (r) { | 361 | if (r) { |
361 | pr_err("Event cb registration failed %d\n", r); | 362 | pr_err("Event cb registration failed %d\n", r); |
@@ -368,7 +369,7 @@ static int nfc_mei_phy_enable(void *phy_id) | |||
368 | 369 | ||
369 | err: | 370 | err: |
370 | phy->powered = 0; | 371 | phy->powered = 0; |
371 | mei_cl_disable_device(phy->cldev); | 372 | mei_cldev_disable(phy->cldev); |
372 | return r; | 373 | return r; |
373 | } | 374 | } |
374 | 375 | ||
@@ -378,7 +379,7 @@ static void nfc_mei_phy_disable(void *phy_id) | |||
378 | 379 | ||
379 | pr_info("%s\n", __func__); | 380 | pr_info("%s\n", __func__); |
380 | 381 | ||
381 | mei_cl_disable_device(phy->cldev); | 382 | mei_cldev_disable(phy->cldev); |
382 | 383 | ||
383 | phy->powered = 0; | 384 | phy->powered = 0; |
384 | } | 385 | } |
@@ -400,7 +401,7 @@ struct nfc_mei_phy *nfc_mei_phy_alloc(struct mei_cl_device *cldev) | |||
400 | 401 | ||
401 | phy->cldev = cldev; | 402 | phy->cldev = cldev; |
402 | init_waitqueue_head(&phy->send_wq); | 403 | init_waitqueue_head(&phy->send_wq); |
403 | mei_cl_set_drvdata(cldev, phy); | 404 | mei_cldev_set_drvdata(cldev, phy); |
404 | 405 | ||
405 | return phy; | 406 | return phy; |
406 | } | 407 | } |
@@ -408,7 +409,7 @@ EXPORT_SYMBOL_GPL(nfc_mei_phy_alloc); | |||
408 | 409 | ||
409 | void nfc_mei_phy_free(struct nfc_mei_phy *phy) | 410 | void nfc_mei_phy_free(struct nfc_mei_phy *phy) |
410 | { | 411 | { |
411 | mei_cl_disable_device(phy->cldev); | 412 | mei_cldev_disable(phy->cldev); |
412 | kfree(phy); | 413 | kfree(phy); |
413 | } | 414 | } |
414 | EXPORT_SYMBOL_GPL(nfc_mei_phy_free); | 415 | EXPORT_SYMBOL_GPL(nfc_mei_phy_free); |
diff --git a/drivers/nfc/microread/mei.c b/drivers/nfc/microread/mei.c index 994871c02b7b..3092501f26c4 100644 --- a/drivers/nfc/microread/mei.c +++ b/drivers/nfc/microread/mei.c | |||
@@ -57,7 +57,7 @@ static int microread_mei_probe(struct mei_cl_device *cldev, | |||
57 | 57 | ||
58 | static int microread_mei_remove(struct mei_cl_device *cldev) | 58 | static int microread_mei_remove(struct mei_cl_device *cldev) |
59 | { | 59 | { |
60 | struct nfc_mei_phy *phy = mei_cl_get_drvdata(cldev); | 60 | struct nfc_mei_phy *phy = mei_cldev_get_drvdata(cldev); |
61 | 61 | ||
62 | microread_remove(phy->hdev); | 62 | microread_remove(phy->hdev); |
63 | 63 | ||
@@ -88,7 +88,7 @@ static int microread_mei_init(void) | |||
88 | 88 | ||
89 | pr_debug(DRIVER_DESC ": %s\n", __func__); | 89 | pr_debug(DRIVER_DESC ": %s\n", __func__); |
90 | 90 | ||
91 | r = mei_cl_driver_register(µread_driver); | 91 | r = mei_cldev_driver_register(µread_driver); |
92 | if (r) { | 92 | if (r) { |
93 | pr_err(MICROREAD_DRIVER_NAME ": driver registration failed\n"); | 93 | pr_err(MICROREAD_DRIVER_NAME ": driver registration failed\n"); |
94 | return r; | 94 | return r; |
@@ -99,7 +99,7 @@ static int microread_mei_init(void) | |||
99 | 99 | ||
100 | static void microread_mei_exit(void) | 100 | static void microread_mei_exit(void) |
101 | { | 101 | { |
102 | mei_cl_driver_unregister(µread_driver); | 102 | mei_cldev_driver_unregister(µread_driver); |
103 | } | 103 | } |
104 | 104 | ||
105 | module_init(microread_mei_init); | 105 | module_init(microread_mei_init); |
diff --git a/drivers/nfc/pn544/mei.c b/drivers/nfc/pn544/mei.c index 2a2c9304e64c..46d0eb24eef9 100644 --- a/drivers/nfc/pn544/mei.c +++ b/drivers/nfc/pn544/mei.c | |||
@@ -55,7 +55,7 @@ static int pn544_mei_probe(struct mei_cl_device *cldev, | |||
55 | 55 | ||
56 | static int pn544_mei_remove(struct mei_cl_device *cldev) | 56 | static int pn544_mei_remove(struct mei_cl_device *cldev) |
57 | { | 57 | { |
58 | struct nfc_mei_phy *phy = mei_cl_get_drvdata(cldev); | 58 | struct nfc_mei_phy *phy = mei_cldev_get_drvdata(cldev); |
59 | 59 | ||
60 | pr_info("Removing pn544\n"); | 60 | pr_info("Removing pn544\n"); |
61 | 61 | ||
@@ -88,7 +88,7 @@ static int pn544_mei_init(void) | |||
88 | 88 | ||
89 | pr_debug(DRIVER_DESC ": %s\n", __func__); | 89 | pr_debug(DRIVER_DESC ": %s\n", __func__); |
90 | 90 | ||
91 | r = mei_cl_driver_register(&pn544_driver); | 91 | r = mei_cldev_driver_register(&pn544_driver); |
92 | if (r) { | 92 | if (r) { |
93 | pr_err(PN544_DRIVER_NAME ": driver registration failed\n"); | 93 | pr_err(PN544_DRIVER_NAME ": driver registration failed\n"); |
94 | return r; | 94 | return r; |
@@ -99,7 +99,7 @@ static int pn544_mei_init(void) | |||
99 | 99 | ||
100 | static void pn544_mei_exit(void) | 100 | static void pn544_mei_exit(void) |
101 | { | 101 | { |
102 | mei_cl_driver_unregister(&pn544_driver); | 102 | mei_cldev_driver_unregister(&pn544_driver); |
103 | } | 103 | } |
104 | 104 | ||
105 | module_init(pn544_mei_init); | 105 | module_init(pn544_mei_init); |
diff --git a/include/linux/mei_cl_bus.h b/include/linux/mei_cl_bus.h index c364df750405..e746919530f5 100644 --- a/include/linux/mei_cl_bus.h +++ b/include/linux/mei_cl_bus.h | |||
@@ -8,8 +8,8 @@ | |||
8 | struct mei_cl_device; | 8 | struct mei_cl_device; |
9 | struct mei_device; | 9 | struct mei_device; |
10 | 10 | ||
11 | typedef void (*mei_cl_event_cb_t)(struct mei_cl_device *cldev, | 11 | typedef void (*mei_cldev_event_cb_t)(struct mei_cl_device *cldev, |
12 | u32 events, void *context); | 12 | u32 events, void *context); |
13 | 13 | ||
14 | /** | 14 | /** |
15 | * struct mei_cl_device - MEI device handle | 15 | * struct mei_cl_device - MEI device handle |
@@ -45,7 +45,7 @@ struct mei_cl_device { | |||
45 | char name[MEI_CL_NAME_SIZE]; | 45 | char name[MEI_CL_NAME_SIZE]; |
46 | 46 | ||
47 | struct work_struct event_work; | 47 | struct work_struct event_work; |
48 | mei_cl_event_cb_t event_cb; | 48 | mei_cldev_event_cb_t event_cb; |
49 | void *event_context; | 49 | void *event_context; |
50 | unsigned long events_mask; | 50 | unsigned long events_mask; |
51 | unsigned long events; | 51 | unsigned long events; |
@@ -67,18 +67,19 @@ struct mei_cl_driver { | |||
67 | int (*remove)(struct mei_cl_device *cldev); | 67 | int (*remove)(struct mei_cl_device *cldev); |
68 | }; | 68 | }; |
69 | 69 | ||
70 | int __mei_cl_driver_register(struct mei_cl_driver *cldrv, struct module *owner); | 70 | int __mei_cldev_driver_register(struct mei_cl_driver *cldrv, |
71 | #define mei_cl_driver_register(cldrv) \ | 71 | struct module *owner); |
72 | __mei_cl_driver_register(cldrv, THIS_MODULE) | 72 | #define mei_cldev_driver_register(cldrv) \ |
73 | __mei_cldev_driver_register(cldrv, THIS_MODULE) | ||
73 | 74 | ||
74 | void mei_cl_driver_unregister(struct mei_cl_driver *cldrv); | 75 | void mei_cldev_driver_unregister(struct mei_cl_driver *cldrv); |
75 | 76 | ||
76 | ssize_t mei_cl_send(struct mei_cl_device *cldev, u8 *buf, size_t length); | 77 | ssize_t mei_cldev_send(struct mei_cl_device *cldev, u8 *buf, size_t length); |
77 | ssize_t mei_cl_recv(struct mei_cl_device *cldev, u8 *buf, size_t length); | 78 | ssize_t mei_cldev_recv(struct mei_cl_device *cldev, u8 *buf, size_t length); |
78 | 79 | ||
79 | int mei_cl_register_event_cb(struct mei_cl_device *cldev, | 80 | int mei_cldev_register_event_cb(struct mei_cl_device *cldev, |
80 | unsigned long event_mask, | 81 | unsigned long event_mask, |
81 | mei_cl_event_cb_t read_cb, void *context); | 82 | mei_cldev_event_cb_t read_cb, void *context); |
82 | 83 | ||
83 | #define MEI_CL_EVENT_RX 0 | 84 | #define MEI_CL_EVENT_RX 0 |
84 | #define MEI_CL_EVENT_TX 1 | 85 | #define MEI_CL_EVENT_TX 1 |
@@ -87,11 +88,11 @@ int mei_cl_register_event_cb(struct mei_cl_device *cldev, | |||
87 | const uuid_le *mei_cldev_uuid(const struct mei_cl_device *cldev); | 88 | const uuid_le *mei_cldev_uuid(const struct mei_cl_device *cldev); |
88 | u8 mei_cldev_ver(const struct mei_cl_device *cldev); | 89 | u8 mei_cldev_ver(const struct mei_cl_device *cldev); |
89 | 90 | ||
90 | void *mei_cl_get_drvdata(const struct mei_cl_device *cldev); | 91 | void *mei_cldev_get_drvdata(const struct mei_cl_device *cldev); |
91 | void mei_cl_set_drvdata(struct mei_cl_device *cldev, void *data); | 92 | void mei_cldev_set_drvdata(struct mei_cl_device *cldev, void *data); |
92 | 93 | ||
93 | int mei_cl_enable_device(struct mei_cl_device *cldev); | 94 | int mei_cldev_enable(struct mei_cl_device *cldev); |
94 | int mei_cl_disable_device(struct mei_cl_device *cldev); | 95 | int mei_cldev_disable(struct mei_cl_device *cldev); |
95 | bool mei_cldev_enabled(struct mei_cl_device *cldev); | 96 | bool mei_cldev_enabled(struct mei_cl_device *cldev); |
96 | 97 | ||
97 | #endif /* _LINUX_MEI_CL_BUS_H */ | 98 | #endif /* _LINUX_MEI_CL_BUS_H */ |