From: Simon Glass Date: Mon, 1 Oct 2018 18:22:26 +0000 (-0600) Subject: video: Adjust video_clear() to return an error X-Git-Tag: v2018.11-rc2~7^2~21 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c6ebd011bb27750263e8dd62e33ed5cdd49dc88e;p=oweals%2Fu-boot.git video: Adjust video_clear() to return an error All driver-model operation should return an error code. Adjust this function to do so also. Signed-off-by: Simon Glass Reviewed-by: Anatolij Gustschin --- diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index fea0886c41..44dfa71b6f 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -86,7 +86,7 @@ int video_reserve(ulong *addrp) return 0; } -void video_clear(struct udevice *dev) +int video_clear(struct udevice *dev) { struct video_priv *priv = dev_get_uclass_priv(dev); @@ -111,6 +111,8 @@ void video_clear(struct udevice *dev) memset(priv->fb, priv->colour_bg, priv->fb_size); break; } + + return 0; } void video_set_default_colors(struct video_priv *priv) diff --git a/include/video.h b/include/video.h index cd5558f86e..ab416c1cfa 100644 --- a/include/video.h +++ b/include/video.h @@ -120,8 +120,9 @@ int video_reserve(ulong *addrp); * video_clear() - Clear a device's frame buffer to background color. * * @dev: Device to clear + * @return 0 */ -void video_clear(struct udevice *dev); +int video_clear(struct udevice *dev); /** * video_sync() - Sync a device's frame buffer with its hardware