Message ID | 1473082723-17048-3-git-send-email-yamada.masahiro@socionext.com |
---|---|
State | New |
Headers | show |
2016-09-06 2:12 GMT+09:00 Anatolij Gustschin <agust@denx.de>: > On Mon, 5 Sep 2016 22:38:38 +0900 > Masahiro Yamada yamada.masahiro@socionext.com wrote: > >> ptn3460_attach() and display_update_config_from_edid() will become >> a simple wrapper function. >> >> For vidconsole_post_probe(), it is common coding style to let a >> probe method return the value of a resister function. > > s/resister/register/ > > otherwise > > Acked-by: Anatolij Gustschin <agust@denx.de> I will send v3. Thanks! -- Best Regards Masahiro Yamada _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
diff --git a/drivers/video/bridge/ptn3460.c b/drivers/video/bridge/ptn3460.c index 2e2ae7c..f9d3720 100644 --- a/drivers/video/bridge/ptn3460.c +++ b/drivers/video/bridge/ptn3460.c @@ -11,14 +11,9 @@ static int ptn3460_attach(struct udevice *dev) { - int ret; - debug("%s: %s\n", __func__, dev->name); - ret = video_bridge_set_active(dev, true); - if (ret) - return ret; - return 0; + return video_bridge_set_active(dev, true); } struct video_bridge_ops ptn3460_ops = { diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c index 2f1f0df..d8999c3 100644 --- a/drivers/video/tegra124/display.c +++ b/drivers/video/tegra124/display.c @@ -326,13 +326,7 @@ static int display_update_config_from_edid(struct udevice *dp_dev, int *panel_bppp, struct display_timing *timing) { - int ret; - - ret = display_read_timing(dp_dev, timing); - if (ret) - return ret; - - return 0; + return display_read_timing(dp_dev, timing); } static int display_init(struct udevice *dev, void *lcdbase, diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c index c8cc05e..e9a90b1 100644 --- a/drivers/video/vidconsole-uclass.c +++ b/drivers/video/vidconsole-uclass.c @@ -190,7 +190,6 @@ static int vidconsole_post_probe(struct udevice *dev) { struct vidconsole_priv *priv = dev_get_uclass_priv(dev); struct stdio_dev *sdev = &priv->sdev; - int ret; if (!priv->tab_width_frac) priv->tab_width_frac = VID_TO_POS(priv->x_charsize) * 8; @@ -206,11 +205,8 @@ static int vidconsole_post_probe(struct udevice *dev) sdev->putc = vidconsole_putc; sdev->puts = vidconsole_puts; sdev->priv = dev; - ret = stdio_register(sdev); - if (ret) - return ret; - return 0; + return stdio_register(sdev); } UCLASS_DRIVER(vidconsole) = {
ptn3460_attach() and display_update_config_from_edid() will become a simple wrapper function. For vidconsole_post_probe(), it is common coding style to let a probe method return the value of a resister function. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- drivers/video/bridge/ptn3460.c | 7 +------ drivers/video/tegra124/display.c | 8 +------- drivers/video/vidconsole-uclass.c | 6 +----- 3 files changed, 3 insertions(+), 18 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot