@@ -357,9 +357,6 @@ static struct uart_driver sc16is7xx_uart = {
357
357
.nr = SC16IS7XX_MAX_DEVS ,
358
358
};
359
359
360
- static void sc16is7xx_ier_set (struct uart_port * port , u8 bit );
361
- static void sc16is7xx_stop_tx (struct uart_port * port );
362
-
363
360
#define to_sc16is7xx_one (p ,e ) ((container_of((p), struct sc16is7xx_one, e)))
364
361
365
362
static u8 sc16is7xx_port_read (struct uart_port * port , u8 reg )
@@ -415,6 +412,42 @@ static void sc16is7xx_power(struct uart_port *port, int on)
415
412
on ? 0 : SC16IS7XX_IER_SLEEP_BIT );
416
413
}
417
414
415
+ static void sc16is7xx_ier_clear (struct uart_port * port , u8 bit )
416
+ {
417
+ struct sc16is7xx_port * s = dev_get_drvdata (port -> dev );
418
+ struct sc16is7xx_one * one = to_sc16is7xx_one (port , port );
419
+
420
+ lockdep_assert_held_once (& port -> lock );
421
+
422
+ one -> config .flags |= SC16IS7XX_RECONF_IER ;
423
+ one -> config .ier_mask |= bit ;
424
+ one -> config .ier_val &= ~bit ;
425
+ kthread_queue_work (& s -> kworker , & one -> reg_work );
426
+ }
427
+
428
+ static void sc16is7xx_ier_set (struct uart_port * port , u8 bit )
429
+ {
430
+ struct sc16is7xx_port * s = dev_get_drvdata (port -> dev );
431
+ struct sc16is7xx_one * one = to_sc16is7xx_one (port , port );
432
+
433
+ lockdep_assert_held_once (& port -> lock );
434
+
435
+ one -> config .flags |= SC16IS7XX_RECONF_IER ;
436
+ one -> config .ier_mask |= bit ;
437
+ one -> config .ier_val |= bit ;
438
+ kthread_queue_work (& s -> kworker , & one -> reg_work );
439
+ }
440
+
441
+ static void sc16is7xx_stop_tx (struct uart_port * port )
442
+ {
443
+ sc16is7xx_ier_clear (port , SC16IS7XX_IER_THRI_BIT );
444
+ }
445
+
446
+ static void sc16is7xx_stop_rx (struct uart_port * port )
447
+ {
448
+ sc16is7xx_ier_clear (port , SC16IS7XX_IER_RDI_BIT );
449
+ }
450
+
418
451
static const struct sc16is7xx_devtype sc16is74x_devtype = {
419
452
.name = "SC16IS74X" ,
420
453
.nr_gpio = 0 ,
@@ -867,42 +900,6 @@ static void sc16is7xx_reg_proc(struct kthread_work *ws)
867
900
sc16is7xx_reconf_rs485 (& one -> port );
868
901
}
869
902
870
- static void sc16is7xx_ier_clear (struct uart_port * port , u8 bit )
871
- {
872
- struct sc16is7xx_port * s = dev_get_drvdata (port -> dev );
873
- struct sc16is7xx_one * one = to_sc16is7xx_one (port , port );
874
-
875
- lockdep_assert_held_once (& port -> lock );
876
-
877
- one -> config .flags |= SC16IS7XX_RECONF_IER ;
878
- one -> config .ier_mask |= bit ;
879
- one -> config .ier_val &= ~bit ;
880
- kthread_queue_work (& s -> kworker , & one -> reg_work );
881
- }
882
-
883
- static void sc16is7xx_ier_set (struct uart_port * port , u8 bit )
884
- {
885
- struct sc16is7xx_port * s = dev_get_drvdata (port -> dev );
886
- struct sc16is7xx_one * one = to_sc16is7xx_one (port , port );
887
-
888
- lockdep_assert_held_once (& port -> lock );
889
-
890
- one -> config .flags |= SC16IS7XX_RECONF_IER ;
891
- one -> config .ier_mask |= bit ;
892
- one -> config .ier_val |= bit ;
893
- kthread_queue_work (& s -> kworker , & one -> reg_work );
894
- }
895
-
896
- static void sc16is7xx_stop_tx (struct uart_port * port )
897
- {
898
- sc16is7xx_ier_clear (port , SC16IS7XX_IER_THRI_BIT );
899
- }
900
-
901
- static void sc16is7xx_stop_rx (struct uart_port * port )
902
- {
903
- sc16is7xx_ier_clear (port , SC16IS7XX_IER_RDI_BIT );
904
- }
905
-
906
903
static void sc16is7xx_ms_proc (struct kthread_work * ws )
907
904
{
908
905
struct sc16is7xx_one * one = to_sc16is7xx_one (ws , ms_work .work );
0 commit comments