[Concept,15/22] video: Rename video_sync() to sync() in struct video_ops

Message ID 20251003165525.440173-16-sjg@u-boot.org
State New
Headers
Series video: Enhancements to support a pointer |

Commit Message

Simon Glass Oct. 3, 2025, 4:55 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

Shorten the video_sync member in struct video_ops to just sync() since
the struct name already provides the context that this is a video
operation.

Update all implementations and callers of this operation.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/efi.c          |  2 +-
 drivers/video/mcde_simple.c  |  2 +-
 drivers/video/seps525.c      |  2 +-
 drivers/video/video-uclass.c |  4 ++--
 include/video.h              | 12 ++++++------
 5 files changed, 11 insertions(+), 11 deletions(-)
  

Patch

diff --git a/drivers/video/efi.c b/drivers/video/efi.c
index 1fe76f27bcc..578392c3908 100644
--- a/drivers/video/efi.c
+++ b/drivers/video/efi.c
@@ -291,7 +291,7 @@  static int efi_video_bind(struct udevice *dev)
 }
 
 const static struct video_ops efi_video_ops = {
-	.video_sync	= efi_video_sync,
+	.sync	= efi_video_sync,
 };
 
 static const struct udevice_id efi_video_ids[] = {
diff --git a/drivers/video/mcde_simple.c b/drivers/video/mcde_simple.c
index 2ba5d0de152..7591e088e38 100644
--- a/drivers/video/mcde_simple.c
+++ b/drivers/video/mcde_simple.c
@@ -122,7 +122,7 @@  static int mcde_simple_video_sync(struct udevice *dev)
 }
 
 static struct video_ops mcde_simple_ops = {
-	.video_sync = mcde_simple_video_sync,
+	.sync = mcde_simple_video_sync,
 };
 
 static const struct udevice_id mcde_simple_ids[] = {
diff --git a/drivers/video/seps525.c b/drivers/video/seps525.c
index 86cd301c4b9..11293872a5c 100644
--- a/drivers/video/seps525.c
+++ b/drivers/video/seps525.c
@@ -306,7 +306,7 @@  static int seps525_bind(struct udevice *dev)
 }
 
 static const struct video_ops seps525_ops = {
-	.video_sync = seps525_sync,
+	.sync = seps525_sync,
 };
 
 static const struct udevice_id seps525_ids[] = {
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 5c2cb251683..bf633861ef3 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -507,8 +507,8 @@  int video_sync(struct udevice *vid, bool force)
 	if (IS_ENABLED(CONFIG_VIDEO_COPY))
 		video_flush_copy(vid);
 
-	if (ops && ops->video_sync) {
-		ret = ops->video_sync(vid);
+	if (ops && ops->sync) {
+		ret = ops->sync(vid);
 		if (ret)
 			return ret;
 	}
diff --git a/include/video.h b/include/video.h
index 92dca60a872..116a10afc93 100644
--- a/include/video.h
+++ b/include/video.h
@@ -133,14 +133,14 @@  struct video_priv {
 
 /**
  * struct video_ops - structure for keeping video operations
- * @video_sync: Synchronize FB with device. Some device like SPI based LCD
- *		displays needs synchronization when data in an FB is available.
- *		For these devices implement video_sync hook to call a sync
- *		function. vid is pointer to video device udevice. Function
- *		should return 0 on success video_sync and error code otherwise
+ * @sync: Synchronize FB with device. Some device like SPI based LCD
+ *	  displays needs synchronization when data in an FB is available.
+ *	  For these devices implement sync hook to call a sync function.
+ *	  vid is pointer to video device udevice. Function should return 0
+ *	  on success and error code otherwise
  */
 struct video_ops {
-	int (*video_sync)(struct udevice *vid);
+	int (*sync)(struct udevice *vid);
 };
 
 #define video_get_ops(dev)        ((struct video_ops *)(dev)->driver->ops)