serial: max3100: Remove unneeded forward declaration
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 2 Apr 2024 19:50:41 +0000 (22:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Apr 2024 13:51:51 +0000 (15:51 +0200)
There is no code using max3100_work() before the definition of it.
Remove unneeded forward declaration.

While at it, move max3100_dowork() and max3100_timeout() down in
the code to be after actual max3100_work() implementation.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240402195306.269276-15-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/max3100.c

index 285675c3a8481537e0d9e74be57dc5e72284a503..75e96ff745715429663681a38b0c9f4bdced307a 100644 (file)
@@ -159,22 +159,6 @@ static void max3100_calc_parity(struct max3100_port *s, u16 *c)
                *c |= max3100_do_parity(s, *c) << 8;
 }
 
-static void max3100_work(struct work_struct *w);
-
-static void max3100_dowork(struct max3100_port *s)
-{
-       if (!s->force_end_work && !freezing(current) && !s->suspending)
-               queue_work(s->workqueue, &s->work);
-}
-
-static void max3100_timeout(struct timer_list *t)
-{
-       struct max3100_port *s = from_timer(s, t, timer);
-
-       max3100_dowork(s);
-       mod_timer(&s->timer, jiffies + uart_poll_timeout(&s->port));
-}
-
 static int max3100_sr(struct max3100_port *s, u16 tx, u16 *rx)
 {
        struct spi_message message;
@@ -318,6 +302,20 @@ static void max3100_work(struct work_struct *w)
                tty_flip_buffer_push(&s->port.state->port);
 }
 
+static void max3100_dowork(struct max3100_port *s)
+{
+       if (!s->force_end_work && !freezing(current) && !s->suspending)
+               queue_work(s->workqueue, &s->work);
+}
+
+static void max3100_timeout(struct timer_list *t)
+{
+       struct max3100_port *s = from_timer(s, t, timer);
+
+       max3100_dowork(s);
+       mod_timer(&s->timer, jiffies + uart_poll_timeout(&s->port));
+}
+
 static irqreturn_t max3100_irq(int irqno, void *dev_id)
 {
        struct max3100_port *s = dev_id;