diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-12-14 13:35:08 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-01-10 15:43:46 +0100 |
commit | e70b9d7a74698f1374244b2251216428db920aed (patch) | |
tree | b8091531241075d04501751b5236ab54afbe48c2 /drivers/firmware | |
parent | 12763d0fe56899d3729d0e6755446ed7c740a88a (diff) | |
download | barebox-e70b9d7a74698f1374244b2251216428db920aed.tar.gz |
Rename device_d::device_node to device_d::of_node
Linux struct device has the member of_node for the device_node pointer.
Rename this in barebox accordingly to minimize the necessary changes
when porting Linux code. This was done with the semantic patch:
@@ struct device_d E; @@
- E.device_node
+ E.of_node
@@ struct device_d *E; @@
- E->device_node
+ E->of_node
Plus some manual adjustments.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20221214123512.189688-2-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/altera_serial.c | 8 | ||||
-rw-r--r-- | drivers/firmware/arm_scmi/bus.c | 2 | ||||
-rw-r--r-- | drivers/firmware/arm_scmi/driver.c | 2 | ||||
-rw-r--r-- | drivers/firmware/arm_scmi/smc.c | 6 | ||||
-rw-r--r-- | drivers/firmware/socfpga.c | 6 | ||||
-rw-r--r-- | drivers/firmware/zynqmp-fpga.c | 6 |
6 files changed, 15 insertions, 15 deletions
diff --git a/drivers/firmware/altera_serial.c b/drivers/firmware/altera_serial.c index dcb49ad4dd..27eb367a68 100644 --- a/drivers/firmware/altera_serial.c +++ b/drivers/firmware/altera_serial.c @@ -267,7 +267,7 @@ static int altera_spi_close(struct firmware_handler *fh) static int altera_spi_of(struct device_d *dev, struct fpga_spi *this) { - struct device_node *n = dev->device_node; + struct device_node *n = dev->of_node; const char *name; int ret; @@ -334,7 +334,7 @@ static int altera_spi_probe(struct device_d *dev) int rc; struct fpga_spi *this; struct firmware_handler *fh; - const char *alias = of_alias_get(dev->device_node); + const char *alias = of_alias_get(dev->of_node); const char *model = NULL; const struct altera_ps_data *data; @@ -359,11 +359,11 @@ static int altera_spi_probe(struct device_d *dev) fh->open = altera_spi_open; fh->write = altera_spi_write; fh->close = altera_spi_close; - of_property_read_string(dev->device_node, "compatible", &model); + of_property_read_string(dev->of_node, "compatible", &model); if (model) fh->model = xstrdup(model); fh->dev = dev; - fh->device_node = dev->device_node; + fh->device_node = dev->of_node; this->spi = (struct spi_device *)dev->type_data; this->data = data; diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c index e8297be4d2..1f6338aa2f 100644 --- a/drivers/firmware/arm_scmi/bus.c +++ b/drivers/firmware/arm_scmi/bus.c @@ -159,7 +159,7 @@ scmi_device_alloc(struct device_node *np, struct device_d *parent, int protocol, scmi_dev->dev.id = DEVICE_ID_DYNAMIC; scmi_dev->protocol_id = protocol; scmi_dev->dev.parent = parent; - scmi_dev->dev.device_node = np; + scmi_dev->dev.of_node = np; scmi_dev->dev.bus = &scmi_bus_type; dev_set_name(&scmi_dev->dev, "scmi_dev"); diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index fc02a53a2b..a74746ac30 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -1154,7 +1154,7 @@ static int scmi_probe(struct device_d *dev) struct scmi_handle *handle; const struct scmi_desc *desc; struct scmi_info *info; - struct device_node *child, *np = dev->device_node; + struct device_node *child, *np = dev->of_node; desc = of_device_get_match_data(dev); if (!desc) diff --git a/drivers/firmware/arm_scmi/smc.c b/drivers/firmware/arm_scmi/smc.c index 67f19a7b43..fd45d55b2e 100644 --- a/drivers/firmware/arm_scmi/smc.c +++ b/drivers/firmware/arm_scmi/smc.c @@ -31,7 +31,7 @@ struct scmi_smc { static bool smc_chan_available(struct device_d *dev, int idx) { - return of_parse_phandle(dev->device_node, "shmem", 0) != NULL; + return of_parse_phandle(dev->of_node, "shmem", 0) != NULL; } static int smc_chan_setup(struct scmi_chan_info *cinfo, struct device_d *dev, @@ -52,7 +52,7 @@ static int smc_chan_setup(struct scmi_chan_info *cinfo, struct device_d *dev, if (!scmi_info) return -ENOMEM; - np = of_parse_phandle(cdev->device_node, "shmem", 0); + np = of_parse_phandle(cdev->of_node, "shmem", 0); ret = of_address_to_resource(np, 0, &res); if (ret) { dev_err(cdev, "failed to get SCMI Tx shared memory\n"); @@ -62,7 +62,7 @@ static int smc_chan_setup(struct scmi_chan_info *cinfo, struct device_d *dev, size = resource_size(&res); scmi_info->shmem = IOMEM(res.start); - ret = of_property_read_u32(dev->device_node, "arm,smc-id", &func_id); + ret = of_property_read_u32(dev->of_node, "arm,smc-id", &func_id); if (ret < 0) return ret; diff --git a/drivers/firmware/socfpga.c b/drivers/firmware/socfpga.c index 98b47f6570..4ab41cbf79 100644 --- a/drivers/firmware/socfpga.c +++ b/drivers/firmware/socfpga.c @@ -382,7 +382,7 @@ static int socfpga_fpgamgr_probe(struct device_d *dev) struct resource *iores; struct fpgamgr *mgr; struct firmware_handler *fh; - const char *alias = of_alias_get(dev->device_node); + const char *alias = of_alias_get(dev->of_node); const char *model = NULL; struct param_d *p; int ret; @@ -414,7 +414,7 @@ static int socfpga_fpgamgr_probe(struct device_d *dev) fh->open = socfpga_fpgamgr_program_start; fh->write = socfpga_fpgamgr_program_write_buf; fh->close = socfpga_fpgamgr_program_finish; - of_property_read_string(dev->device_node, "compatible", &model); + of_property_read_string(dev->of_node, "compatible", &model); if (model) fh->model = xstrdup(model); fh->dev = dev; @@ -435,7 +435,7 @@ static int socfpga_fpgamgr_probe(struct device_d *dev) } fh->dev = &mgr->dev; - fh->device_node = dev->device_node; + fh->device_node = dev->of_node; ret = firmwaremgr_register(fh); if (ret != 0) { diff --git a/drivers/firmware/zynqmp-fpga.c b/drivers/firmware/zynqmp-fpga.c index 63d7398fd4..0c40522ddf 100644 --- a/drivers/firmware/zynqmp-fpga.c +++ b/drivers/firmware/zynqmp-fpga.c @@ -330,7 +330,7 @@ static int zynqmp_fpga_probe(struct device_d *dev) { struct fpgamgr *mgr; struct firmware_handler *fh; - const char *alias = of_alias_get(dev->device_node); + const char *alias = of_alias_get(dev->of_node); const char *model = NULL; struct param_d *p; u32 api_version; @@ -347,7 +347,7 @@ static int zynqmp_fpga_probe(struct device_d *dev) fh->open = fpgamgr_program_start; fh->write = fpgamgr_program_write_buf; fh->close = fpgamgr_program_finish; - of_property_read_string(dev->device_node, "compatible", &model); + of_property_read_string(dev->of_node, "compatible", &model); if (model) fh->model = xstrdup(model); fh->dev = dev; @@ -381,7 +381,7 @@ static int zynqmp_fpga_probe(struct device_d *dev) } fh->dev = &mgr->dev; - fh->device_node = dev->device_node; + fh->device_node = dev->of_node; ret = firmwaremgr_register(fh); if (ret != 0) { |