]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
disk: Make blk_get_ops() internal to blk uclass
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sun, 13 Aug 2023 23:46:48 +0000 (01:46 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 22 Aug 2023 19:17:52 +0000 (15:17 -0400)
Move the macro into blk-uclass.c , since it is only used there.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/block/blk-uclass.c
include/blk.h

index 9521b3eb8788d8637806fd8de1788040a392bb1d..6aac92d99627dd003c586a975e68f84ddf75f21d 100644 (file)
@@ -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;
index 2c9c7985a885d42ddf71594a8041ba56dd419654..8986e953e5a41e01a9f68cab2b35b5e9a496fe52 100644 (file)
@@ -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