[PATCH 8/8] disk: Make blk_get_ops() internal to blk uclass

Marek Vasut marek.vasut+renesas at mailbox.org
Mon Aug 14 01:46:48 CEST 2023


Move the macro into blk-uclass.c , since it is only used there.

Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
---
Cc: AKASHI Takahiro <takahiro.akashi at linaro.org>
Cc: Abdellatif El Khlifi <abdellatif.elkhlifi at arm.com>
Cc: Bin Meng <bmeng.cn at gmail.com>
Cc: Heinrich Schuchardt <xypron.glplk at gmx.de>
Cc: Joshua Watt <jpewhacker at gmail.com>
Cc: Michal Suchanek <msuchanek at suse.de>
Cc: Simon Glass <sjg at chromium.org>
Cc: Tobias Waldekranz <tobias at waldekranz.com>
---
 drivers/block/blk-uclass.c | 2 ++
 include/blk.h              | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c
index 9521b3eb878..6aac92d9962 100644
--- a/drivers/block/blk-uclass.c
+++ b/drivers/block/blk-uclass.c
@@ -17,6 +17,8 @@
 #include <dm/uclass-internal.h>
 #include <linux/err.h>
 
+#define blk_get_ops(dev)	((struct blk_ops *)(dev)->driver->ops)
+
 static struct {
 	enum uclass_id id;
 	const char *name;
diff --git a/include/blk.h b/include/blk.h
index 2c9c7985a88..8986e953e5a 100644
--- a/include/blk.h
+++ b/include/blk.h
@@ -262,8 +262,6 @@ struct blk_ops {
 	int (*select_hwpart)(struct udevice *dev, int hwpart);
 };
 
-#define blk_get_ops(dev)	((struct blk_ops *)(dev)->driver->ops)
-
 /*
  * These functions should take struct udevice instead of struct blk_desc,
  * but this is convenient for migration to driver model. Add a 'd' prefix
-- 
2.40.1



More information about the U-Boot mailing list