OSDN Git Service

tty: max310x: Introduce max310x_one port macro-wrapper
authorSerge Semin <fancer.lancer@gmail.com>
Tue, 14 May 2019 10:14:10 +0000 (13:14 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2019 10:15:53 +0000 (12:15 +0200)
commit1b5d239af3dad5b2572c9dab2e70f6735410e18f
tree80157d25558d35bdefbda24ad0502c817eda84d9
parent2987590b7846bc55530d02fcb568ce338a1e5bdd
tty: max310x: Introduce max310x_one port macro-wrapper

uart_port structure instance is embedded into the max310x_one
super-structure, which is accessed by some of the uart-port callback
methods. In order to improve the callback's code readability lets
define the to_max310x_port() wrapper which just translates the passed
uart_port pointer to the max310x_one one. It is also going to be
handy in future commits.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/max310x.c