tty: goldfish: Refactor constants to better reflect their nature
authorAleksandar Markovic <aleksandar.markovic@imgtec.com>
Tue, 29 Aug 2017 13:53:18 +0000 (15:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Aug 2017 16:58:45 +0000 (18:58 +0200)
commit2296eee704e70dac7fef8ac13f2716e4896dd13e
treede7658dad8634607a5110f28b54ca7c84ace35e0
parentae28d7402a7e7cf3dd0da1f2eb6a52b337873e08
tty: goldfish: Refactor constants to better reflect their nature

Classify constants GOLDFISH_TTY_xxx into two groups: command ids and
register offsets. Apply different naming for register offsets (add
'REG_' after 'GOLDFISH_TTY_' in constant names). Change implementation
to use preprocessor's '#define' statements instead of 'enum'
declaration (as this is more common way of implementation in such
cases).

This makes the driver code easier to follow and hopefully prevents
future bugs.

Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com>
Signed-off-by: Goran Ferenc <goran.ferenc@imgtec.com>
Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/goldfish.c