diff mbox series

[U-Boot,22/45] video: Adjust video_clear() to return an error

Message ID 20181001182249.129565-23-sjg@chromium.org
State Accepted
Commit c6ebd011bb27750263e8dd62e33ed5cdd49dc88e
Delegated to: Simon Glass
Headers show
Series Various fixes and improvements | expand

Commit Message

Simon Glass Oct. 1, 2018, 6:22 p.m. UTC
All driver-model operation should return an error code. Adjust this
function to do so also.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/video-uclass.c | 4 +++-
 include/video.h              | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

Comments

Anatolij Gustschin Oct. 1, 2018, 7:23 p.m. UTC | #1
On Mon,  1 Oct 2018 12:22:26 -0600
Simon Glass sjg@chromium.org wrote:

> All driver-model operation should return an error code. Adjust this
> function to do so also.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Anatolij Gustschin <agust@denx.de>

--
Anatolij
Simon Glass Oct. 9, 2018, 11:55 p.m. UTC | #2
On Mon,  1 Oct 2018 12:22:26 -0600
Simon Glass sjg@chromium.org wrote:

> All driver-model operation should return an error code. Adjust this
> function to do so also.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Anatolij Gustschin <agust@denx.de>

--
Anatolij

Applied to u-boot-dm
diff mbox series

Patch

diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index fea0886c415..44dfa71b6f4 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 cd5558f86eb..ab416c1cfac 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