]> asedeno.scripts.mit.edu Git - linux.git/commit
serial: 8250_uniphier: hardcode regshift to avoid unneeded memory read
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 24 Oct 2016 08:00:29 +0000 (17:00 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2016 13:30:08 +0000 (14:30 +0100)
commit94cbb6978b63d004502eed24417aceb7b36bc10a
treea6535edd940a60f52ad5130dcdc125adc438b60f
parent5131dcd7810806fe4ff81ca23dadb47921285e36
serial: 8250_uniphier: hardcode regshift to avoid unneeded memory read

For this driver, uart_port::regshift is always 2.  Hardcode the
shift value instead of reading ->regshift to get an already known
value.  (pointed out by Denys Vlasenko)

Furthermore, I am using register macros that are already shifted,
which will save code a bit.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_uniphier.c