Skip to content

Commit 6226e5f

Browse files
Jisheng Zhanggregkh
authored andcommitted
serial: 8250: export serial8250_do_set_divisor()
Some drivers could call serial8250_do_set_divisor() to complete its own set_divisor routine. Export this symbol for code reusing. Signed-off-by: Jisheng Zhang <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0238d2b commit 6226e5f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

drivers/tty/serial/8250/8250_port.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2580,8 +2580,8 @@ static unsigned char serial8250_compute_lcr(struct uart_8250_port *up,
25802580
return cval;
25812581
}
25822582

2583-
static void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud,
2584-
unsigned int quot, unsigned int quot_frac)
2583+
void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud,
2584+
unsigned int quot, unsigned int quot_frac)
25852585
{
25862586
struct uart_8250_port *up = up_to_u8250p(port);
25872587

@@ -2612,6 +2612,7 @@ static void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud,
26122612
serial_port_out(port, 0x2, quot_frac);
26132613
}
26142614
}
2615+
EXPORT_SYMBOL_GPL(serial8250_do_set_divisor);
26152616

26162617
static void serial8250_set_divisor(struct uart_port *port, unsigned int baud,
26172618
unsigned int quot, unsigned int quot_frac)

include/linux/serial_8250.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ extern void serial8250_do_shutdown(struct uart_port *port);
160160
extern void serial8250_do_pm(struct uart_port *port, unsigned int state,
161161
unsigned int oldstate);
162162
extern void serial8250_do_set_mctrl(struct uart_port *port, unsigned int mctrl);
163+
extern void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud,
164+
unsigned int quot,
165+
unsigned int quot_frac);
163166
extern int fsl8250_handle_irq(struct uart_port *port);
164167
int serial8250_handle_irq(struct uart_port *port, unsigned int iir);
165168
unsigned char serial8250_rx_chars(struct uart_8250_port *up, unsigned char lsr);

0 commit comments

Comments
 (0)