serial: 8250_dw: simplify optional reset handling
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 15 Mar 2017 11:31:50 +0000 (12:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2017 05:17:12 +0000 (14:17 +0900)
commitacbdad8dd1abd98b216d8c37ff9c6de4aa595534
tree229dc98e8a3d305d0ff079725d0b68ddcf30dd5c
parent22077b091a4720d4336bd806e9c93b2a81fcc38a
serial: 8250_dw: simplify optional reset handling

As of commit bb475230b8e5 ("reset: make optional functions really
optional"), the reset framework API calls use NULL pointers to describe
optional, non-present reset controls.

This allows to return errors from devm_reset_control_get_optional and to
call reset_control_(de)assert unconditionally.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_dw.c