Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mei: bus: complete variable rename of type struct mei_cl_device

In the
commit 5c079ae11921 ("mei: bus: fix drivers and devices names confusion")
we set the variables of type struct mei_cl_device to 'cldev'
but few places were left out, namely mei_cl_bus.h header
and the mei nfc drivers.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Tomas Winkler and committed by
Greg Kroah-Hartman
89391382 01a14ede

+39 -40
+15 -15
drivers/nfc/mei_phy.c
··· 118 118 cmd.sub_command = MEI_NFC_SUBCMD_IF_VERSION; 119 119 120 120 MEI_DUMP_NFC_HDR("version", &cmd.hdr); 121 - r = mei_cl_send(phy->device, (u8 *)&cmd, sizeof(struct mei_nfc_cmd)); 121 + r = mei_cl_send(phy->cldev, (u8 *)&cmd, sizeof(struct mei_nfc_cmd)); 122 122 if (r < 0) { 123 123 pr_err("Could not send IF version cmd\n"); 124 124 return r; ··· 132 132 if (!reply) 133 133 return -ENOMEM; 134 134 135 - bytes_recv = mei_cl_recv(phy->device, (u8 *)reply, if_version_length); 135 + bytes_recv = mei_cl_recv(phy->cldev, (u8 *)reply, if_version_length); 136 136 if (bytes_recv < 0 || bytes_recv < sizeof(struct mei_nfc_reply)) { 137 137 pr_err("Could not read IF version\n"); 138 138 r = -EIO; ··· 186 186 connect->vendor_id = phy->vendor_id; 187 187 188 188 MEI_DUMP_NFC_HDR("connect request", &cmd->hdr); 189 - r = mei_cl_send(phy->device, (u8 *)cmd, connect_length); 189 + r = mei_cl_send(phy->cldev, (u8 *)cmd, connect_length); 190 190 if (r < 0) { 191 191 pr_err("Could not send connect cmd %d\n", r); 192 192 goto err; 193 193 } 194 194 195 - bytes_recv = mei_cl_recv(phy->device, (u8 *)reply, connect_resp_length); 195 + bytes_recv = mei_cl_recv(phy->cldev, (u8 *)reply, connect_resp_length); 196 196 if (bytes_recv < 0) { 197 197 r = bytes_recv; 198 198 pr_err("Could not read connect response %d\n", r); ··· 238 238 MEI_DUMP_NFC_HDR("send", hdr); 239 239 240 240 memcpy(mei_buf + MEI_NFC_HEADER_SIZE, buf, length); 241 - err = mei_cl_send(phy->device, mei_buf, length + MEI_NFC_HEADER_SIZE); 241 + err = mei_cl_send(phy->cldev, mei_buf, length + MEI_NFC_HEADER_SIZE); 242 242 if (err < 0) 243 243 goto out; 244 244 ··· 278 278 struct mei_nfc_hdr *hdr; 279 279 int received_length; 280 280 281 - received_length = mei_cl_recv(phy->device, buf, length); 281 + received_length = mei_cl_recv(phy->cldev, buf, length); 282 282 if (received_length < 0) 283 283 return received_length; 284 284 ··· 296 296 } 297 297 298 298 299 - static void nfc_mei_event_cb(struct mei_cl_device *device, u32 events, 299 + static void nfc_mei_event_cb(struct mei_cl_device *cldev, u32 events, 300 300 void *context) 301 301 { 302 302 struct nfc_mei_phy *phy = context; ··· 337 337 if (phy->powered == 1) 338 338 return 0; 339 339 340 - r = mei_cl_enable_device(phy->device); 340 + r = mei_cl_enable_device(phy->cldev); 341 341 if (r < 0) { 342 342 pr_err("Could not enable device %d\n", r); 343 343 return r; ··· 355 355 goto err; 356 356 } 357 357 358 - r = mei_cl_register_event_cb(phy->device, BIT(MEI_CL_EVENT_RX), 358 + r = mei_cl_register_event_cb(phy->cldev, BIT(MEI_CL_EVENT_RX), 359 359 nfc_mei_event_cb, phy); 360 360 if (r) { 361 361 pr_err("Event cb registration failed %d\n", r); ··· 368 368 369 369 err: 370 370 phy->powered = 0; 371 - mei_cl_disable_device(phy->device); 371 + mei_cl_disable_device(phy->cldev); 372 372 return r; 373 373 } 374 374 ··· 378 378 379 379 pr_info("%s\n", __func__); 380 380 381 - mei_cl_disable_device(phy->device); 381 + mei_cl_disable_device(phy->cldev); 382 382 383 383 phy->powered = 0; 384 384 } ··· 390 390 }; 391 391 EXPORT_SYMBOL_GPL(mei_phy_ops); 392 392 393 - struct nfc_mei_phy *nfc_mei_phy_alloc(struct mei_cl_device *device) 393 + struct nfc_mei_phy *nfc_mei_phy_alloc(struct mei_cl_device *cldev) 394 394 { 395 395 struct nfc_mei_phy *phy; 396 396 ··· 398 398 if (!phy) 399 399 return NULL; 400 400 401 - phy->device = device; 401 + phy->cldev = cldev; 402 402 init_waitqueue_head(&phy->send_wq); 403 - mei_cl_set_drvdata(device, phy); 403 + mei_cl_set_drvdata(cldev, phy); 404 404 405 405 return phy; 406 406 } ··· 408 408 409 409 void nfc_mei_phy_free(struct nfc_mei_phy *phy) 410 410 { 411 - mei_cl_disable_device(phy->device); 411 + mei_cl_disable_device(phy->cldev); 412 412 kfree(phy); 413 413 } 414 414 EXPORT_SYMBOL_GPL(nfc_mei_phy_free);
+2 -2
drivers/nfc/mei_phy.h
··· 13 13 /** 14 14 * struct nfc_mei_phy 15 15 * 16 - * @device: mei device 16 + * @cldev: mei client device 17 17 * @hdev: nfc hci device 18 18 19 19 * @send_wq: send completion wait queue ··· 28 28 * and prevents normal operation. 29 29 */ 30 30 struct nfc_mei_phy { 31 - struct mei_cl_device *device; 31 + struct mei_cl_device *cldev; 32 32 struct nfc_hci_dev *hdev; 33 33 34 34 wait_queue_head_t send_wq;
+4 -4
drivers/nfc/microread/mei.c
··· 29 29 30 30 #define MICROREAD_DRIVER_NAME "microread" 31 31 32 - static int microread_mei_probe(struct mei_cl_device *device, 32 + static int microread_mei_probe(struct mei_cl_device *cldev, 33 33 const struct mei_cl_device_id *id) 34 34 { 35 35 struct nfc_mei_phy *phy; ··· 37 37 38 38 pr_info("Probing NFC microread\n"); 39 39 40 - phy = nfc_mei_phy_alloc(device); 40 + phy = nfc_mei_phy_alloc(cldev); 41 41 if (!phy) { 42 42 pr_err("Cannot allocate memory for microread mei phy.\n"); 43 43 return -ENOMEM; ··· 55 55 return 0; 56 56 } 57 57 58 - static int microread_mei_remove(struct mei_cl_device *device) 58 + static int microread_mei_remove(struct mei_cl_device *cldev) 59 59 { 60 - struct nfc_mei_phy *phy = mei_cl_get_drvdata(device); 60 + struct nfc_mei_phy *phy = mei_cl_get_drvdata(cldev); 61 61 62 62 microread_remove(phy->hdev); 63 63
+4 -4
drivers/nfc/pn544/mei.c
··· 27 27 28 28 #define PN544_DRIVER_NAME "pn544" 29 29 30 - static int pn544_mei_probe(struct mei_cl_device *device, 30 + static int pn544_mei_probe(struct mei_cl_device *cldev, 31 31 const struct mei_cl_device_id *id) 32 32 { 33 33 struct nfc_mei_phy *phy; ··· 35 35 36 36 pr_info("Probing NFC pn544\n"); 37 37 38 - phy = nfc_mei_phy_alloc(device); 38 + phy = nfc_mei_phy_alloc(cldev); 39 39 if (!phy) { 40 40 pr_err("Cannot allocate memory for pn544 mei phy.\n"); 41 41 return -ENOMEM; ··· 53 53 return 0; 54 54 } 55 55 56 - static int pn544_mei_remove(struct mei_cl_device *device) 56 + static int pn544_mei_remove(struct mei_cl_device *cldev) 57 57 { 58 - struct nfc_mei_phy *phy = mei_cl_get_drvdata(device); 58 + struct nfc_mei_phy *phy = mei_cl_get_drvdata(cldev); 59 59 60 60 pr_info("Removing pn544\n"); 61 61
+14 -15
include/linux/mei_cl_bus.h
··· 8 8 struct mei_cl_device; 9 9 struct mei_device; 10 10 11 - typedef void (*mei_cl_event_cb_t)(struct mei_cl_device *device, 11 + typedef void (*mei_cl_event_cb_t)(struct mei_cl_device *cldev, 12 12 u32 events, void *context); 13 13 14 14 /** ··· 62 62 63 63 const struct mei_cl_device_id *id_table; 64 64 65 - int (*probe)(struct mei_cl_device *dev, 65 + int (*probe)(struct mei_cl_device *cldev, 66 66 const struct mei_cl_device_id *id); 67 - int (*remove)(struct mei_cl_device *dev); 67 + int (*remove)(struct mei_cl_device *cldev); 68 68 }; 69 69 70 - int __mei_cl_driver_register(struct mei_cl_driver *driver, 71 - struct module *owner); 72 - #define mei_cl_driver_register(driver) \ 73 - __mei_cl_driver_register(driver, THIS_MODULE) 70 + int __mei_cl_driver_register(struct mei_cl_driver *cldrv, struct module *owner); 71 + #define mei_cl_driver_register(cldrv) \ 72 + __mei_cl_driver_register(cldrv, THIS_MODULE) 74 73 75 - void mei_cl_driver_unregister(struct mei_cl_driver *driver); 74 + void mei_cl_driver_unregister(struct mei_cl_driver *cldrv); 76 75 77 - ssize_t mei_cl_send(struct mei_cl_device *device, u8 *buf, size_t length); 78 - ssize_t mei_cl_recv(struct mei_cl_device *device, u8 *buf, size_t length); 76 + ssize_t mei_cl_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); 79 78 80 - int mei_cl_register_event_cb(struct mei_cl_device *device, 79 + int mei_cl_register_event_cb(struct mei_cl_device *cldev, 81 80 unsigned long event_mask, 82 81 mei_cl_event_cb_t read_cb, void *context); 83 82 ··· 87 88 const uuid_le *mei_cldev_uuid(const struct mei_cl_device *cldev); 88 89 u8 mei_cldev_ver(const struct mei_cl_device *cldev); 89 90 90 - void *mei_cl_get_drvdata(const struct mei_cl_device *device); 91 - void mei_cl_set_drvdata(struct mei_cl_device *device, void *data); 91 + void *mei_cl_get_drvdata(const struct mei_cl_device *cldev); 92 + void mei_cl_set_drvdata(struct mei_cl_device *cldev, void *data); 92 93 93 - int mei_cl_enable_device(struct mei_cl_device *device); 94 - int mei_cl_disable_device(struct mei_cl_device *device); 94 + int mei_cl_enable_device(struct mei_cl_device *cldev); 95 + int mei_cl_disable_device(struct mei_cl_device *cldev); 95 96 bool mei_cldev_enabled(struct mei_cl_device *cldev); 96 97 97 98 #endif /* _LINUX_MEI_CL_BUS_H */