mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-06 05:13:18 +00:00
serial: sc16is7xx: reorder code to remove prototype declarations
Move/reorder some functions to remove sc16is7xx_ier_set() and
sc16is7xx_stop_tx() prototypes declarations.
No functional change.
sc16is7xx_ier_set() was introduced in
commit cc4c1d05eb
("sc16is7xx: Properly resume TX after stop").
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20231221231823.2327894-16-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f031d763dc
commit
2de8a1b467
@ -357,9 +357,6 @@ static struct uart_driver sc16is7xx_uart = {
|
||||
.nr = SC16IS7XX_MAX_DEVS,
|
||||
};
|
||||
|
||||
static void sc16is7xx_ier_set(struct uart_port *port, u8 bit);
|
||||
static void sc16is7xx_stop_tx(struct uart_port *port);
|
||||
|
||||
#define to_sc16is7xx_one(p,e) ((container_of((p), struct sc16is7xx_one, e)))
|
||||
|
||||
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)
|
||||
on ? 0 : SC16IS7XX_IER_SLEEP_BIT);
|
||||
}
|
||||
|
||||
static void sc16is7xx_ier_clear(struct uart_port *port, u8 bit)
|
||||
{
|
||||
struct sc16is7xx_port *s = dev_get_drvdata(port->dev);
|
||||
struct sc16is7xx_one *one = to_sc16is7xx_one(port, port);
|
||||
|
||||
lockdep_assert_held_once(&port->lock);
|
||||
|
||||
one->config.flags |= SC16IS7XX_RECONF_IER;
|
||||
one->config.ier_mask |= bit;
|
||||
one->config.ier_val &= ~bit;
|
||||
kthread_queue_work(&s->kworker, &one->reg_work);
|
||||
}
|
||||
|
||||
static void sc16is7xx_ier_set(struct uart_port *port, u8 bit)
|
||||
{
|
||||
struct sc16is7xx_port *s = dev_get_drvdata(port->dev);
|
||||
struct sc16is7xx_one *one = to_sc16is7xx_one(port, port);
|
||||
|
||||
lockdep_assert_held_once(&port->lock);
|
||||
|
||||
one->config.flags |= SC16IS7XX_RECONF_IER;
|
||||
one->config.ier_mask |= bit;
|
||||
one->config.ier_val |= bit;
|
||||
kthread_queue_work(&s->kworker, &one->reg_work);
|
||||
}
|
||||
|
||||
static void sc16is7xx_stop_tx(struct uart_port *port)
|
||||
{
|
||||
sc16is7xx_ier_clear(port, SC16IS7XX_IER_THRI_BIT);
|
||||
}
|
||||
|
||||
static void sc16is7xx_stop_rx(struct uart_port *port)
|
||||
{
|
||||
sc16is7xx_ier_clear(port, SC16IS7XX_IER_RDI_BIT);
|
||||
}
|
||||
|
||||
static const struct sc16is7xx_devtype sc16is74x_devtype = {
|
||||
.name = "SC16IS74X",
|
||||
.nr_gpio = 0,
|
||||
@ -867,42 +900,6 @@ static void sc16is7xx_reg_proc(struct kthread_work *ws)
|
||||
sc16is7xx_reconf_rs485(&one->port);
|
||||
}
|
||||
|
||||
static void sc16is7xx_ier_clear(struct uart_port *port, u8 bit)
|
||||
{
|
||||
struct sc16is7xx_port *s = dev_get_drvdata(port->dev);
|
||||
struct sc16is7xx_one *one = to_sc16is7xx_one(port, port);
|
||||
|
||||
lockdep_assert_held_once(&port->lock);
|
||||
|
||||
one->config.flags |= SC16IS7XX_RECONF_IER;
|
||||
one->config.ier_mask |= bit;
|
||||
one->config.ier_val &= ~bit;
|
||||
kthread_queue_work(&s->kworker, &one->reg_work);
|
||||
}
|
||||
|
||||
static void sc16is7xx_ier_set(struct uart_port *port, u8 bit)
|
||||
{
|
||||
struct sc16is7xx_port *s = dev_get_drvdata(port->dev);
|
||||
struct sc16is7xx_one *one = to_sc16is7xx_one(port, port);
|
||||
|
||||
lockdep_assert_held_once(&port->lock);
|
||||
|
||||
one->config.flags |= SC16IS7XX_RECONF_IER;
|
||||
one->config.ier_mask |= bit;
|
||||
one->config.ier_val |= bit;
|
||||
kthread_queue_work(&s->kworker, &one->reg_work);
|
||||
}
|
||||
|
||||
static void sc16is7xx_stop_tx(struct uart_port *port)
|
||||
{
|
||||
sc16is7xx_ier_clear(port, SC16IS7XX_IER_THRI_BIT);
|
||||
}
|
||||
|
||||
static void sc16is7xx_stop_rx(struct uart_port *port)
|
||||
{
|
||||
sc16is7xx_ier_clear(port, SC16IS7XX_IER_RDI_BIT);
|
||||
}
|
||||
|
||||
static void sc16is7xx_ms_proc(struct kthread_work *ws)
|
||||
{
|
||||
struct sc16is7xx_one *one = to_sc16is7xx_one(ws, ms_work.work);
|
||||
|
Loading…
Reference in New Issue
Block a user