summaryrefslogtreecommitdiff
path: root/include/of_device.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-12-14 13:35:09 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2023-01-10 15:43:47 +0100
commitc0afc799fb9a19a11f651596fe23b4b755593887 (patch)
tree9c27f1533193d31757744b22b2af9186d23e67ed /include/of_device.h
parente70b9d7a74698f1374244b2251216428db920aed (diff)
downloadbarebox-c0afc799fb9a19a11f651596fe23b4b755593887.tar.gz
Rename struct device_d to device
The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/of_device.h')
-rw-r--r--include/of_device.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/of_device.h b/include/of_device.h
index cef6d5b5cc..eec9c90368 100644
--- a/include/of_device.h
+++ b/include/of_device.h
@@ -8,42 +8,42 @@
#ifdef CONFIG_OFTREE
extern const struct of_device_id *of_match_device(
- const struct of_device_id *matches, const struct device_d *dev);
+ const struct of_device_id *matches, const struct device *dev);
/**
* of_driver_match_device - Tell if a driver's of_match_table matches a device.
* @drv: the device_driver structure to test
* @dev: the device structure to match against
*/
-static inline int of_driver_match_device(struct device_d *dev,
+static inline int of_driver_match_device(struct device *dev,
const struct driver_d *drv)
{
return of_match_device(drv->of_compatible, dev) != NULL;
}
-extern const void *of_device_get_match_data(const struct device_d *dev);
-extern const char *of_device_get_match_compatible(const struct device_d *dev);
+extern const void *of_device_get_match_data(const struct device *dev);
+extern const char *of_device_get_match_compatible(const struct device *dev);
#else /* CONFIG_OFTREE */
-static inline int of_driver_match_device(struct device_d *dev,
- const struct device_d *drv)
+static inline int of_driver_match_device(struct device *dev,
+ const struct device *drv)
{
return 0;
}
-static inline const void *of_device_get_match_data(const struct device_d *dev)
+static inline const void *of_device_get_match_data(const struct device *dev)
{
return NULL;
}
-static inline const char *of_device_get_match_compatible(const struct device_d *dev)
+static inline const char *of_device_get_match_compatible(const struct device *dev)
{
return NULL;
}
static inline const struct of_device_id *__of_match_device(
- const struct of_device_id *matches, const struct device_d *dev)
+ const struct of_device_id *matches, const struct device *dev)
{
return NULL;
}