disk: Make blk_get_ops() internal to blk uclass

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>
This commit is contained in:
Marek Vasut 2023-08-14 01:46:48 +02:00 committed by Tom Rini
parent 804f7d63f2
commit 7f0fba9fb0
2 changed files with 2 additions and 2 deletions

View file

@ -17,6 +17,8 @@
#include <dm/uclass-internal.h> #include <dm/uclass-internal.h>
#include <linux/err.h> #include <linux/err.h>
#define blk_get_ops(dev) ((struct blk_ops *)(dev)->driver->ops)
static struct { static struct {
enum uclass_id id; enum uclass_id id;
const char *name; const char *name;

View file

@ -262,8 +262,6 @@ struct blk_ops {
int (*select_hwpart)(struct udevice *dev, int hwpart); 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, * These functions should take struct udevice instead of struct blk_desc,
* but this is convenient for migration to driver model. Add a 'd' prefix * but this is convenient for migration to driver model. Add a 'd' prefix