Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d0c4dfe authored by Rob Herring's avatar Rob Herring
Browse files

of/fdt: update of_get_flat_dt_prop in prep for libfdt



Make of_get_flat_dt_prop arguments compatible with libfdt fdt_getprop
call in preparation to convert FDT code to use libfdt. Make the return
value const and the property length ptr type an int.

Signed-off-by: default avatarRob Herring <robh@kernel.org>
Tested-by: default avatarMichal Simek <michal.simek@xilinx.com>
Tested-by: default avatarGrant Likely <grant.likely@linaro.org>
Tested-by: default avatarStephen Chivers <schivers@csc.com>
parent bba04d96
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ const struct machine_desc * __init setup_machine_fdt(void *dt)
	const struct machine_desc *mdesc;
	unsigned long dt_root;
	void *clk;
	unsigned long len;
	int len;

	if (!early_init_dt_scan(dt))
		return NULL;
+1 −1
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)

	if (!mdesc) {
		const char *prop;
		long size;
		int size;
		unsigned long dt_root;

		early_print("\nError: unrecognized/unsupported "
+1 −1
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
{
	struct map_desc iodesc;
	__be32 *reg;
	unsigned long len;
	int len;

	if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid") &&
		!of_flat_dt_is_compatible(node, "samsung,exynos5440-clock"))
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ static int __init vexpress_dt_find_scu(unsigned long node,
{
	if (of_flat_dt_match(node, vexpress_dt_cortex_a9_match)) {
		phys_addr_t phys_addr;
		__be32 *reg = of_get_flat_dt_prop(node, "reg", NULL);
		const __be32 *reg = of_get_flat_dt_prop(node, "reg", NULL);

		if (WARN_ON(!reg))
			return -EINVAL;
+2 −2
Original line number Diff line number Diff line
@@ -125,8 +125,8 @@ device_initcall(s5p_mfc_memory_init);
int __init s5p_fdt_alloc_mfc_mem(unsigned long node, const char *uname,
				int depth, void *data)
{
	__be32 *prop;
	unsigned long len;
	const __be32 *prop;
	int len;
	struct s5p_mfc_dt_meminfo mfc_mem;

	if (!data)
Loading