diff options
author | Simon Glass <sjg@chromium.org> | 2018-12-28 14:23:08 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-01-14 17:47:13 -0700 |
commit | 67d1b0513079049baa3e0e38603eb33a3857af5d (patch) | |
tree | 7cfee737937dd1d74d9f60e86a808970f382b19e /drivers/serial | |
parent | 0171f432047e86305593bb1eb1cc86f853e55029 (diff) | |
download | u-boot-67d1b0513079049baa3e0e38603eb33a3857af5d.tar.gz u-boot-67d1b0513079049baa3e0e38603eb33a3857af5d.tar.bz2 u-boot-67d1b0513079049baa3e0e38603eb33a3857af5d.zip |
dm: serial: Adjust serial_getconfig() to use proper API
All driver-model functions should have a device as the first parameter.
Update this function accordingly.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/serial-uclass.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c index ffcd6d15af..81f1067f42 100644 --- a/drivers/serial/serial-uclass.c +++ b/drivers/serial/serial-uclass.c @@ -294,16 +294,13 @@ void serial_setbrg(void) ops->setbrg(gd->cur_serial_dev, gd->baudrate); } -int serial_getconfig(uint *config) +int serial_getconfig(struct udevice *dev, uint *config) { struct dm_serial_ops *ops; - if (!gd->cur_serial_dev) - return 0; - - ops = serial_get_ops(gd->cur_serial_dev); + ops = serial_get_ops(dev); if (ops->getconfig) - return ops->getconfig(gd->cur_serial_dev, config); + return ops->getconfig(dev, config); return 0; } |