[PATCH 1/9] driver: alias of_match_ptr and DRV_OF_COMPAT
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Jan 16 05:44:53 PST 2023
Linux calls our DRV_OF_COMPAT of_match_ptr. Support both names for
a while with the intention of removing DRV_OF_COMPAT
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
include/driver.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/driver.h b/include/driver.h
index 0f0cf1bbb046..b878bf4b785d 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -608,9 +608,11 @@ struct devfs_partition {
int devfs_create_partitions(const char *devname,
const struct devfs_partition partinfo[]);
-#define DRV_OF_COMPAT(compat) \
+#define of_match_ptr(compat) \
IS_ENABLED(CONFIG_OFDEVICE) ? (compat) : NULL
+#define DRV_OF_COMPAT(compat) of_match_ptr(compat)
+
/**
* dev_get_drvdata - get driver match data associated with device
* @dev: device instance
--
2.30.2
More information about the barebox
mailing list