NFC: pn533: Avoid function declarations
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Wed, 3 Apr 2013 06:02:09 +0000 (08:02 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 11 Apr 2013 14:29:05 +0000 (16:29 +0200)
Reorder code to avoid functions declaration.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/pn533.c

index 72860569fb1a76dbfb13c983ed550596d6197e5a..faf377aec73c106b2b8e70352be85c08cc96342f 100644 (file)
@@ -504,18 +504,6 @@ static bool pn533_rx_frame_is_cmd_response(struct pn533 *dev, void *frame)
                                PN533_CMD_RESPONSE(dev->cmd->code));
 }
 
-static int pn533_send_async_complete(struct pn533 *dev);
-
-static void pn533_wq_cmd_complete(struct work_struct *work)
-{
-       struct pn533 *dev = container_of(work, struct pn533, cmd_complete_work);
-       int rc;
-
-       rc = pn533_send_async_complete(dev);
-       if (rc != -EINPROGRESS)
-               queue_work(dev->wq, &dev->cmd_work);
-}
-
 static void pn533_recv_response(struct urb *urb)
 {
        struct pn533 *dev = urb->context;
@@ -864,6 +852,16 @@ static int pn533_send_cmd_direct_async(struct pn533 *dev, u8 cmd_code,
        return rc;
 }
 
+static void pn533_wq_cmd_complete(struct work_struct *work)
+{
+       struct pn533 *dev = container_of(work, struct pn533, cmd_complete_work);
+       int rc;
+
+       rc = pn533_send_async_complete(dev);
+       if (rc != -EINPROGRESS)
+               queue_work(dev->wq, &dev->cmd_work);
+}
+
 static void pn533_wq_cmd(struct work_struct *work)
 {
        struct pn533 *dev = container_of(work, struct pn533, cmd_work);