[Concept,15/22] video: Rename video_sync() to sync() in struct video_ops
Commit Message
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(-)
@@ -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[] = {
@@ -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[] = {
@@ -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[] = {
@@ -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;
}
@@ -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)