aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc/pn533.c
diff options
context:
space:
mode:
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>2013-04-03 02:02:09 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-04-11 10:29:05 -0400
commitc79490e1b5ebf35415147fe06f02d8e77ccfe6d4 (patch)
tree6e82f1e21bf3b0791ca48762b40ed78edf5e5f7d /drivers/nfc/pn533.c
parentddf19d206fe4ba4e7dc9629bc14025ba50915886 (diff)
NFC: pn533: Avoid function declarations
Reorder code to avoid functions declaration. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/pn533.c')
-rw-r--r--drivers/nfc/pn533.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c
index 72860569fb1a..faf377aec73c 100644
--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -504,18 +504,6 @@ static bool pn533_rx_frame_is_cmd_response(struct pn533 *dev, void *frame)
504 PN533_CMD_RESPONSE(dev->cmd->code)); 504 PN533_CMD_RESPONSE(dev->cmd->code));
505} 505}
506 506
507static int pn533_send_async_complete(struct pn533 *dev);
508
509static void pn533_wq_cmd_complete(struct work_struct *work)
510{
511 struct pn533 *dev = container_of(work, struct pn533, cmd_complete_work);
512 int rc;
513
514 rc = pn533_send_async_complete(dev);
515 if (rc != -EINPROGRESS)
516 queue_work(dev->wq, &dev->cmd_work);
517}
518
519static void pn533_recv_response(struct urb *urb) 507static void pn533_recv_response(struct urb *urb)
520{ 508{
521 struct pn533 *dev = urb->context; 509 struct pn533 *dev = urb->context;
@@ -864,6 +852,16 @@ static int pn533_send_cmd_direct_async(struct pn533 *dev, u8 cmd_code,
864 return rc; 852 return rc;
865} 853}
866 854
855static void pn533_wq_cmd_complete(struct work_struct *work)
856{
857 struct pn533 *dev = container_of(work, struct pn533, cmd_complete_work);
858 int rc;
859
860 rc = pn533_send_async_complete(dev);
861 if (rc != -EINPROGRESS)
862 queue_work(dev->wq, &dev->cmd_work);
863}
864
867static void pn533_wq_cmd(struct work_struct *work) 865static void pn533_wq_cmd(struct work_struct *work)
868{ 866{
869 struct pn533 *dev = container_of(work, struct pn533, cmd_work); 867 struct pn533 *dev = container_of(work, struct pn533, cmd_work);