summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2024-01-09 17:15:13 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-01-10 08:24:01 +0100
commitf62e7089fd5f1f91e41d505a6dbe1fc6d15f7673 (patch)
tree560b2300e1c797a353b1032be90b151466416574
parent389b7184230c5376bbeabc8519703e4bd8e9ce8a (diff)
downloadbarebox-f62e7089fd5f1f91e41d505a6dbe1fc6d15f7673.tar.gz
barebox-f62e7089fd5f1f91e41d505a6dbe1fc6d15f7673.tar.xz
ARM: Layerscape: icid: use of_property_write_u32_array() in of_set_iommu_prop()
Use of_property_write_u32_array() rather than of_set_property() to make the code a bit clearer. Link: https://lore.barebox.org/20240109161527.3237581-8-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/mach-layerscape/icid.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-layerscape/icid.c b/arch/arm/mach-layerscape/icid.c
index dd0e160bde..2e0b4a64df 100644
--- a/arch/arm/mach-layerscape/icid.c
+++ b/arch/arm/mach-layerscape/icid.c
@@ -71,12 +71,12 @@ struct icid_id_table {
static void of_set_iommu_prop(struct device_node *np, phandle iommu_handle,
int stream_id)
{
- u32 prop[2];
-
- prop[0] = cpu_to_fdt32(iommu_handle);
- prop[1] = cpu_to_fdt32(stream_id);
+ u32 prop[] = {
+ iommu_handle,
+ stream_id
+ };
- of_set_property(np, "iommus", prop, sizeof(prop), 1);
+ of_property_write_u32_array(np, "iommus", prop, ARRAY_SIZE(prop));
}
static phandle of_get_iommu_handle(struct device_node *root)