From patchwork Fri Oct 3 16:55:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 496 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759510606; bh=DQTWwxvTFo/1bkJZ+EmioPj3aliVtQ87iGySsKPI2Lc=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=WJqPuGS2BoyRaAuMvDQRlxqjbk6fvL4NdFlc1C2Vd6smIA2l4TD4yHqfT5wQej2bz UTo8yBHQiBT1h4Wlg0EPONYRy8ansTKhbBu+0X2ifSRd3ZBFoYoCyNuVhnKS9k7UgW CjY1wIRhic5yrTOKhruhEii3HoaXMHkvzp2Z9LYWIzZPQdPIPTvNTqk4e/aGpdJjfl /FSzTjVRoGEDyqJFV4q31qElLmQhk42LErMBEJjwg1uv3LORU0curH2Kh9WPOu51Wv eK/xkhe+dc+WiNv42d0tKA7FuzZUMTi8fwENQnlpaqNtKLfQFfQYVRx0AtekS+DQF6 C4ek378XQj3QQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C3DB167EC5 for ; Fri, 3 Oct 2025 10:56:46 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id A72PejVgDzsD for ; Fri, 3 Oct 2025 10:56:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759510606; bh=DQTWwxvTFo/1bkJZ+EmioPj3aliVtQ87iGySsKPI2Lc=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=WJqPuGS2BoyRaAuMvDQRlxqjbk6fvL4NdFlc1C2Vd6smIA2l4TD4yHqfT5wQej2bz UTo8yBHQiBT1h4Wlg0EPONYRy8ansTKhbBu+0X2ifSRd3ZBFoYoCyNuVhnKS9k7UgW CjY1wIRhic5yrTOKhruhEii3HoaXMHkvzp2Z9LYWIzZPQdPIPTvNTqk4e/aGpdJjfl /FSzTjVRoGEDyqJFV4q31qElLmQhk42LErMBEJjwg1uv3LORU0curH2Kh9WPOu51Wv eK/xkhe+dc+WiNv42d0tKA7FuzZUMTi8fwENQnlpaqNtKLfQFfQYVRx0AtekS+DQF6 C4ek378XQj3QQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3C7D067F43 for ; Fri, 3 Oct 2025 10:56:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759510603; bh=Y4ISVzFGhGF6LgNzH3Dx09kLiUHmwu+n0lJMd9R+0DY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NZIJyTI7DCQBT/zk+zZpksbhT7AHpiuNGO05Lmldsp+GvIT6dpE5nuLWwkHlMBTo1 yHsh+6Be7AAdrLoDUR6ujfyAVi2V95Nl0pdT6o6pva4p1IHO0wSCR3DKwGi1K6weYq YKdtlHL/zeQTVKzVk5MCt3OMc5beG7S1Wd7lomHssMLGn0T5A9LKkvHAy9l7Ux2qEb gY2bcN/wGW4oZPJhD6EKyzVJwgxl3njD0dF4mpkzP8NzLi8faH8hXxWkAvNCxm7ovN tdFaM6BvEoMnbw5Z1VLzVG+PAvCnLr3xF4dnyOhd8jAvXVIifVRSMNukdG19Th9eij AicN9g5MpnRwA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EC16D67EC7; Fri, 3 Oct 2025 10:56:43 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id E4JbZH1wwdJy; Fri, 3 Oct 2025 10:56:43 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759510602; bh=pE/eaMbJshF1Vn2O1WmTX4sUPO96l/PmRIXoS9OZo2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pZgIaohHwBIrDcnLQoWpnBehIct62PmJzNJqJjXppYhGw4Ezd4oGTpgWzFNWbhLwQ j9BVem05fXrvbJ8zXNQ9zblGxdDffjT6jDvhEjaDw3O9tMyh3E2A4XzHFELQo1D6hJ AeZ1wfJC9su4ETCBWjqJbOAiK17K+8Xybbz56EvndXYiuoUPl8gzEgIiNeAqoHHFM1 xzNdgAKktuuJNdAl2x/GUEGkfbG97Ji8DtiYY+0AY8cfTfQUsHslHW4esCFWJXGtiC 2XDKSt842pmn9x7cdEBHr2d6wy54ifedaiLciy6klXs+DHE1VPkSUdWtVNKZ1aM8Fh jgQ3oi5+AmjqA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 336FB67E83; Fri, 3 Oct 2025 10:56:42 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 3 Oct 2025 10:55:08 -0600 Message-ID: <20251003165525.440173-16-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251003165525.440173-1-sjg@u-boot.org> References: <20251003165525.440173-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 5AXCAL3XW36CO3AQAJZBDXPMXST6KPDM X-Message-ID-Hash: 5AXCAL3XW36CO3AQAJZBDXPMXST6KPDM X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 15/22] video: Rename video_sync() to sync() in struct video_ops List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass 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 Signed-off-by: Simon Glass --- 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(-) 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)