goldfish: clean up the checkpatch warnings
Mostly spacing changes, also making the operations structure const Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e0f682e05f
commit
d78055dc9c
1 changed files with 34 additions and 26 deletions
|
@ -92,14 +92,16 @@ static irqreturn_t goldfish_tty_interrupt(int irq, void *dev_id)
|
|||
|
||||
static int goldfish_tty_activate(struct tty_port *port, struct tty_struct *tty)
|
||||
{
|
||||
struct goldfish_tty *qtty = container_of(port, struct goldfish_tty, port);
|
||||
struct goldfish_tty *qtty = container_of(port, struct goldfish_tty,
|
||||
port);
|
||||
writel(GOLDFISH_TTY_CMD_INT_ENABLE, qtty->base + GOLDFISH_TTY_CMD);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void goldfish_tty_shutdown(struct tty_port *port)
|
||||
{
|
||||
struct goldfish_tty *qtty = container_of(port, struct goldfish_tty, port);
|
||||
struct goldfish_tty *qtty = container_of(port, struct goldfish_tty,
|
||||
port);
|
||||
writel(GOLDFISH_TTY_CMD_INT_DISABLE, qtty->base + GOLDFISH_TTY_CMD);
|
||||
}
|
||||
|
||||
|
@ -119,7 +121,8 @@ static void goldfish_tty_hangup(struct tty_struct *tty)
|
|||
tty_port_hangup(tty->port);
|
||||
}
|
||||
|
||||
static int goldfish_tty_write(struct tty_struct * tty, const unsigned char *buf, int count)
|
||||
static int goldfish_tty_write(struct tty_struct *tty, const unsigned char *buf,
|
||||
int count)
|
||||
{
|
||||
goldfish_tty_do_write(tty->index, buf, count);
|
||||
return count;
|
||||
|
@ -137,12 +140,14 @@ static int goldfish_tty_chars_in_buffer(struct tty_struct *tty)
|
|||
return readl(base + GOLDFISH_TTY_BYTES_READY);
|
||||
}
|
||||
|
||||
static void goldfish_tty_console_write(struct console *co, const char *b, unsigned count)
|
||||
static void goldfish_tty_console_write(struct console *co, const char *b,
|
||||
unsigned count)
|
||||
{
|
||||
goldfish_tty_do_write(co->index, b, count);
|
||||
}
|
||||
|
||||
static struct tty_driver *goldfish_tty_console_device(struct console *c, int *index)
|
||||
static struct tty_driver *goldfish_tty_console_device(struct console *c,
|
||||
int *index)
|
||||
{
|
||||
*index = c->index;
|
||||
return goldfish_tty_driver;
|
||||
|
@ -162,7 +167,7 @@ static struct tty_port_operations goldfish_port_ops = {
|
|||
.shutdown = goldfish_tty_shutdown
|
||||
};
|
||||
|
||||
static struct tty_operations goldfish_tty_ops = {
|
||||
static const struct tty_operations goldfish_tty_ops = {
|
||||
.open = goldfish_tty_open,
|
||||
.close = goldfish_tty_close,
|
||||
.hangup = goldfish_tty_hangup,
|
||||
|
@ -176,7 +181,8 @@ static int goldfish_tty_create_driver(void)
|
|||
int ret;
|
||||
struct tty_driver *tty;
|
||||
|
||||
goldfish_ttys = kzalloc(sizeof(*goldfish_ttys) * goldfish_tty_line_count, GFP_KERNEL);
|
||||
goldfish_ttys = kzalloc(sizeof(*goldfish_ttys) *
|
||||
goldfish_tty_line_count, GFP_KERNEL);
|
||||
if (goldfish_ttys == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto err_alloc_goldfish_ttys_failed;
|
||||
|
@ -191,7 +197,8 @@ static int goldfish_tty_create_driver(void)
|
|||
tty->type = TTY_DRIVER_TYPE_SERIAL;
|
||||
tty->subtype = SERIAL_TYPE_NORMAL;
|
||||
tty->init_termios = tty_std_termios;
|
||||
tty->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
|
||||
tty->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW |
|
||||
TTY_DRIVER_DYNAMIC_DEV;
|
||||
tty_set_operations(tty, &goldfish_tty_ops);
|
||||
ret = tty_register_driver(tty);
|
||||
if (ret)
|
||||
|
@ -262,7 +269,8 @@ static int goldfish_tty_probe(struct platform_device *pdev)
|
|||
|
||||
writel(GOLDFISH_TTY_CMD_INT_DISABLE, base + GOLDFISH_TTY_CMD);
|
||||
|
||||
ret = request_irq(irq, goldfish_tty_interrupt, IRQF_SHARED, "goldfish_tty", pdev);
|
||||
ret = request_irq(irq, goldfish_tty_interrupt, IRQF_SHARED,
|
||||
"goldfish_tty", pdev);
|
||||
if (ret)
|
||||
goto err_request_irq_failed;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue