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/bus | |
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/bus')
-rw-r--r-- | drivers/bus/acpi.c | 16 | ||||
-rw-r--r-- | drivers/bus/imx-weim.c | 4 | ||||
-rw-r--r-- | drivers/bus/omap-gpmc.c | 10 | ||||
-rw-r--r-- | drivers/bus/ti-sysc.c | 2 |
4 files changed, 16 insertions, 16 deletions
diff --git a/drivers/bus/acpi.c b/drivers/bus/acpi.c index b042ee5d9c..a5e8973b7c 100644 --- a/drivers/bus/acpi.c +++ b/drivers/bus/acpi.c @@ -84,7 +84,7 @@ static struct sig_desc { { /* sentinel */ } }; -static struct acpi_sdt *acpi_get_dev_sdt(struct device_d *dev) +static struct acpi_sdt *acpi_get_dev_sdt(struct device *dev) { int i; @@ -96,7 +96,7 @@ static struct acpi_sdt *acpi_get_dev_sdt(struct device_d *dev) return NULL; } -static void acpi_devinfo(struct device_d *dev) +static void acpi_devinfo(struct device *dev) { struct acpi_sdt *sdt = acpi_get_dev_sdt(dev); struct sig_desc *sig_desc; @@ -120,7 +120,7 @@ static void acpi_devinfo(struct device_d *dev) printf("CreatorRevision: %u\n", sdt->creator_revision); } -static int acpi_register_device(struct device_d *dev, struct acpi_sdt *sdt) +static int acpi_register_device(struct device *dev, struct acpi_sdt *sdt) { device_add_resource(dev, "SDT", (resource_size_t)sdt, sdt->len, IORESOURCE_MEM | IORESOURCE_ROM_COPY | IORESOURCE_ROM_BIOS_COPY); @@ -130,10 +130,10 @@ static int acpi_register_device(struct device_d *dev, struct acpi_sdt *sdt) return register_device(dev); } -static struct device_d *acpi_add_device(struct bus_type *bus, +static struct device *acpi_add_device(struct bus_type *bus, acpi_sig_t signature) { - struct device_d *dev; + struct device *dev; dev = xzalloc(sizeof(*dev)); @@ -197,7 +197,7 @@ static int acpi_register_devices(struct bus_type *bus) return 0; } -static int acpi_bus_match(struct device_d *dev, struct driver_d *drv) +static int acpi_bus_match(struct device *dev, struct driver_d *drv) { struct acpi_driver *acpidrv = to_acpi_driver(drv); struct acpi_sdt *sdt = acpi_get_dev_sdt(dev); @@ -205,12 +205,12 @@ static int acpi_bus_match(struct device_d *dev, struct driver_d *drv) return acpi_sigcmp(acpidrv->signature, sdt->signature); } -static int acpi_bus_probe(struct device_d *dev) +static int acpi_bus_probe(struct device *dev) { return dev->driver->probe(dev); } -static void acpi_bus_remove(struct device_d *dev) +static void acpi_bus_remove(struct device *dev) { if (dev->driver->remove) dev->driver->remove(dev); diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c index 7d8471b7ac..3ac2609f47 100644 --- a/drivers/bus/imx-weim.c +++ b/drivers/bus/imx-weim.c @@ -66,7 +66,7 @@ static struct of_device_id weim_id_table[] = { }; struct imx_weim { - struct device_d *dev; + struct device *dev; void __iomem *base; struct imx_weim_devtype *devtype; }; @@ -125,7 +125,7 @@ static int weim_parse_dt(struct imx_weim *weim) return ret; } -static int weim_probe(struct device_d *dev) +static int weim_probe(struct device *dev) { struct resource *iores; struct imx_weim_devtype *devtype; diff --git a/drivers/bus/omap-gpmc.c b/drivers/bus/omap-gpmc.c index 2d3a637820..df9e66b54a 100644 --- a/drivers/bus/omap-gpmc.c +++ b/drivers/bus/omap-gpmc.c @@ -141,7 +141,7 @@ struct gpmc_settings { }; struct imx_gpmc { - struct device_d *dev; + struct device *dev; void __iomem *base; struct imx_gpmc_devtype *devtype; }; @@ -452,7 +452,7 @@ static struct dt_eccmode modes[] = { }, }; -static int gpmc_probe_nand_child(struct device_d *dev, +static int gpmc_probe_nand_child(struct device *dev, struct device_node *child) { u32 val; @@ -537,8 +537,8 @@ static int gpmc_probe_nand_child(struct device_d *dev, * Allocates and configures a GPMC chip-select for a child device. * Returns 0 on success and appropriate negative error code on failure. */ -static int gpmc_probe_generic_child(struct device_d *dev, - struct device_node *child) +static int gpmc_probe_generic_child(struct device *dev, + struct device_node *child) { struct gpmc_settings gpmc_s = {}; struct gpmc_timings gpmc_t = {}; @@ -600,7 +600,7 @@ err: return ret; } -static int gpmc_probe(struct device_d *dev) +static int gpmc_probe(struct device *dev) { struct device_node *child, *node = dev->of_node; int ret; diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index e863e01f3b..862e9d0cc3 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -8,7 +8,7 @@ #include <of.h> #include <linux/err.h> -static int ti_sysc_probe(struct device_d *dev) +static int ti_sysc_probe(struct device *dev) { int ret; |