diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-12-14 13:35:09 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-01-10 15:43:47 +0100 |
commit | c0afc799fb9a19a11f651596fe23b4b755593887 (patch) | |
tree | 9c27f1533193d31757744b22b2af9186d23e67ed /drivers/of | |
parent | e70b9d7a74698f1374244b2251216428db920aed (diff) | |
download | barebox-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 'drivers/of')
-rw-r--r-- | drivers/of/barebox.c | 4 | ||||
-rw-r--r-- | drivers/of/base.c | 6 | ||||
-rw-r--r-- | drivers/of/device.c | 6 | ||||
-rw-r--r-- | drivers/of/of_gpio.c | 2 | ||||
-rw-r--r-- | drivers/of/of_path.c | 6 | ||||
-rw-r--r-- | drivers/of/platform.c | 40 |
6 files changed, 32 insertions, 32 deletions
diff --git a/drivers/of/barebox.c b/drivers/of/barebox.c index 23319c336a..a605d2445d 100644 --- a/drivers/of/barebox.c +++ b/drivers/of/barebox.c @@ -18,7 +18,7 @@ /* If dev describes a file on a fs, mount the fs and change devpath to * point to the file's path. Otherwise leave devpath alone. Does * nothing in env in a file support isn't enabled. */ -static int environment_check_mount(struct device_d *dev, char **devpath) +static int environment_check_mount(struct device *dev, char **devpath) { const char *filepath; int ret; @@ -52,7 +52,7 @@ static int environment_check_mount(struct device_d *dev, char **devpath) return 0; } -static int environment_probe(struct device_d *dev) +static int environment_probe(struct device *dev) { char *path; int ret; diff --git a/drivers/of/base.c b/drivers/of/base.c index 447cbb0e2f..189349f89b 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -739,7 +739,7 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from, } EXPORT_SYMBOL(of_find_matching_node_and_match); -int of_match(struct device_d *dev, struct driver_d *drv) +int of_match(struct device *dev, struct driver_d *drv) { const struct of_device_id *id; @@ -2514,7 +2514,7 @@ mem_initcall(of_probe_memory); static void of_platform_device_create_root(struct device_node *np) { - static struct device_d *dev; + static struct device *dev; int ret; if (dev) @@ -2698,7 +2698,7 @@ struct device_node *of_get_stdoutpath(unsigned int *baudrate) return dn; } -int of_device_is_stdout_path(struct device_d *dev, unsigned int *baudrate) +int of_device_is_stdout_path(struct device *dev, unsigned int *baudrate) { unsigned int tmp = *baudrate; diff --git a/drivers/of/device.c b/drivers/of/device.c index 5d3d016e03..77c027b57e 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -12,7 +12,7 @@ * system is in its list of supported devices. */ const struct of_device_id *of_match_device(const struct of_device_id *matches, - const struct device_d *dev) + const struct device *dev) { if ((!matches) || (!dev->of_node)) return NULL; @@ -21,7 +21,7 @@ const struct of_device_id *of_match_device(const struct of_device_id *matches, } EXPORT_SYMBOL(of_match_device); -const void *of_device_get_match_data(const struct device_d *dev) +const void *of_device_get_match_data(const struct device *dev) { const struct of_device_id *match; @@ -33,7 +33,7 @@ const void *of_device_get_match_data(const struct device_d *dev) } EXPORT_SYMBOL(of_device_get_match_data); -const char *of_device_get_match_compatible(const struct device_d *dev) +const char *of_device_get_match_compatible(const struct device *dev) { const struct of_device_id *match; diff --git a/drivers/of/of_gpio.c b/drivers/of/of_gpio.c index c23923b425..b662563742 100644 --- a/drivers/of/of_gpio.c +++ b/drivers/of/of_gpio.c @@ -61,7 +61,7 @@ int of_get_named_gpio_flags(struct device_node *np, const char *propname, int index, enum of_gpio_flags *flags) { struct of_phandle_args out_args; - struct device_d *dev; + struct device *dev; int of_flags; int ret; diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c index bac95a6edf..1268cf36ee 100644 --- a/drivers/of/of_path.c +++ b/drivers/of/of_path.c @@ -12,9 +12,9 @@ #include <linux/mtd/mtd.h> -struct device_d *of_find_device_by_node_path(const char *path) +struct device *of_find_device_by_node_path(const char *path) { - struct device_d *dev; + struct device *dev; for_each_device(dev) { if (!dev->of_node) @@ -39,7 +39,7 @@ struct device_d *of_find_device_by_node_path(const char *path) */ static int __of_find_path(struct device_node *node, const char *part, char **outpath, unsigned flags) { - struct device_d *dev; + struct device *dev; struct cdev *cdev; bool add_bb = false; diff --git a/drivers/of/platform.c b/drivers/of/platform.c index ac51a6f8e1..725ceeb150 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -19,9 +19,9 @@ * * Returns platform_device pointer, or NULL if not found */ -struct device_d *of_find_device_by_node(struct device_node *np) +struct device *of_find_device_by_node(struct device_node *np) { - struct device_d *dev; + struct device *dev; int ret; ret = of_device_ensure_probed(np); @@ -46,7 +46,7 @@ EXPORT_SYMBOL(of_find_device_by_node); * derive a unique name. If it cannot, then it will prepend names from * parent nodes until a unique name can be derived. */ -static void of_device_make_bus_id(struct device_d *dev) +static void of_device_make_bus_id(struct device *dev) { struct device_node *node = dev->of_node; const __be32 *reg; @@ -114,7 +114,7 @@ bool of_dma_is_coherent(struct device_node *node) } EXPORT_SYMBOL_GPL(of_dma_is_coherent); -static void of_dma_configure(struct device_d *dev, struct device_node *np) +static void of_dma_configure(struct device *dev, struct device_node *np) { u64 dma_addr, paddr, size = 0; unsigned long offset; @@ -138,10 +138,10 @@ static void of_dma_configure(struct device_d *dev, struct device_node *np) * Returns pointer to created platform device, or NULL if a device was not * registered. Unavailable devices will not get registered. */ -struct device_d *of_platform_device_create(struct device_node *np, - struct device_d *parent) +struct device *of_platform_device_create(struct device_node *np, + struct device *parent) { - struct device_d *dev; + struct device *dev; struct resource *res = NULL, temp_res; resource_size_t resinval; int i, ret, num_reg = 0; @@ -209,7 +209,7 @@ struct driver_d dummy_driver = { .name = "dummy-driver", }; -void of_platform_device_dummy_drv(struct device_d *dev) +void of_platform_device_dummy_drv(struct device *dev) { dev->driver = &dummy_driver; } @@ -221,9 +221,9 @@ void of_platform_device_dummy_drv(struct device_d *dev) * Returns pointer to created platform device, or NULL if a device was not * registered. Unavailable devices will not get registered. */ -struct device_d *of_device_enable_and_register(struct device_node *np) +struct device *of_device_enable_and_register(struct device_node *np) { - struct device_d *dev; + struct device *dev; of_device_enable(np); @@ -242,7 +242,7 @@ EXPORT_SYMBOL(of_device_enable_and_register); * Returns pointer to created platform device, or NULL if a device was not * registered. Unavailable devices will not get registered. */ -struct device_d *of_device_enable_and_register_by_name(const char *name) +struct device *of_device_enable_and_register_by_name(const char *name) { struct device_node *node; @@ -264,7 +264,7 @@ EXPORT_SYMBOL(of_device_enable_and_register_by_name); * Returns pointer to created platform device, or NULL if a device was not * registered. Unavailable devices will not get registered. */ -struct device_d *of_device_enable_and_register_by_alias(const char *alias) +struct device *of_device_enable_and_register_by_alias(const char *alias) { struct device_node *node; @@ -277,7 +277,7 @@ struct device_d *of_device_enable_and_register_by_alias(const char *alias) EXPORT_SYMBOL(of_device_enable_and_register_by_alias); #ifdef CONFIG_ARM_AMBA -static struct device_d *of_amba_device_create(struct device_node *np) +static struct device *of_amba_device_create(struct device_node *np) { struct amba_device *dev; int ret; @@ -327,7 +327,7 @@ amba_err_free: return NULL; } #else /* CONFIG_ARM_AMBA */ -static inline struct device_d *of_amba_device_create(struct device_node *np) +static inline struct device *of_amba_device_create(struct device_node *np) { return NULL; } @@ -344,10 +344,10 @@ static inline struct device_d *of_amba_device_create(struct device_node *np) */ static int of_platform_bus_create(struct device_node *bus, const struct of_device_id *matches, - struct device_d *parent) + struct device *parent) { struct device_node *child; - struct device_d *dev; + struct device *dev; int rc = 0; /* Make sure it has a compatible property */ @@ -390,7 +390,7 @@ static int of_platform_bus_create(struct device_node *bus, */ int of_platform_populate(struct device_node *root, const struct of_device_id *matches, - struct device_d *parent) + struct device *parent) { struct device_node *child; int rc = 0; @@ -410,10 +410,10 @@ int of_platform_populate(struct device_node *root, } EXPORT_SYMBOL_GPL(of_platform_populate); -static struct device_d *of_device_create_on_demand(struct device_node *np) +static struct device *of_device_create_on_demand(struct device_node *np) { struct device_node *parent; - struct device_d *parent_dev, *dev; + struct device *parent_dev, *dev; parent = of_get_parent(np); if (!parent) @@ -457,7 +457,7 @@ static struct device_d *of_device_create_on_demand(struct device_node *np) */ int of_device_ensure_probed(struct device_node *np) { - struct device_d *dev; + struct device *dev; if (!deep_probe_is_supported()) return 0; |