Commit bb12dd42 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Michael Ellerman
Browse files

powerpc/powermac: constify device_node in of_irq_parse_oldworld()



The of_irq_parse_oldworld() does not modify passed device_node so make
it a pointer to const for safety.  Drop the extern while modifying the
line.

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210924105653.46963-2-krzysztof.kozlowski@canonical.com
parent cc025916
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -384,7 +384,7 @@ static void __init pmac_pic_probe_oldstyle(void)
#endif
}

int of_irq_parse_oldworld(struct device_node *device, int index,
int of_irq_parse_oldworld(const struct device_node *device, int index,
			struct of_phandle_args *out_irq)
{
	const u32 *ints = NULL;
+3 −3
Original line number Diff line number Diff line
@@ -20,12 +20,12 @@ typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *);
#if defined(CONFIG_PPC32) && defined(CONFIG_PPC_PMAC)
extern unsigned int of_irq_workarounds;
extern struct device_node *of_irq_dflt_pic;
extern int of_irq_parse_oldworld(struct device_node *device, int index,
int of_irq_parse_oldworld(const struct device_node *device, int index,
			  struct of_phandle_args *out_irq);
#else /* CONFIG_PPC32 && CONFIG_PPC_PMAC */
#define of_irq_workarounds (0)
#define of_irq_dflt_pic (NULL)
static inline int of_irq_parse_oldworld(struct device_node *device, int index,
static inline int of_irq_parse_oldworld(const struct device_node *device, int index,
				      struct of_phandle_args *out_irq)
{
	return -EINVAL;