]> git.karo-electronics.de Git - karo-tx-linux.git/commit
8250: of: remove remnants of generic of_serial driver
authorArnd Bergmann <arnd@arndb.de>
Wed, 25 Jan 2017 22:19:01 +0000 (23:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jan 2017 08:23:36 +0000 (09:23 +0100)
commitaa42db44f6705334c6130103492484ea3c7199b3
tree208d37c8d312402d00b8ebfd57c6138607f9102d
parent54b12c48f0c603f25bac3c7c58a02cee65610171
8250: of: remove remnants of generic of_serial driver

During build testing, I ran into a warning in a driver that I
had written myself at some point:

drivers/tty/serial/8250/8250_of.c: In function 'of_platform_serial_probe':
drivers/tty/serial/8250/8250_of.c:233:1: error: the frame size of 1200 bytes is larger than 1152 bytes [-Werror=frame-larger-than=]

This is harmless by itself, but it shows two other problems in
the driver:

- It still tries to be generic enough to handle all kinds of serial
  ports, where in reality the driver has been 8250-only for a while,
  and every other uart has its own DT support

- As a result of that generalization, we keep two copies of
  'struct uart_port' on the stack during probe(). This is completely
  unnessary.

Removing the last code dealing with unsupported port_type values
solves both problems nicely, and reduces the stack size.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_of.c