Skip to content

Commit bb12dd4

Browse files
krzkmpe
authored andcommitted
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: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210924105653.46963-2-krzysztof.kozlowski@canonical.com
1 parent cc02591 commit bb12dd4

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

arch/powerpc/platforms/powermac/pic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ static void __init pmac_pic_probe_oldstyle(void)
384384
#endif
385385
}
386386

387-
int of_irq_parse_oldworld(struct device_node *device, int index,
387+
int of_irq_parse_oldworld(const struct device_node *device, int index,
388388
struct of_phandle_args *out_irq)
389389
{
390390
const u32 *ints = NULL;

include/linux/of_irq.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *);
2020
#if defined(CONFIG_PPC32) && defined(CONFIG_PPC_PMAC)
2121
extern unsigned int of_irq_workarounds;
2222
extern struct device_node *of_irq_dflt_pic;
23-
extern int of_irq_parse_oldworld(struct device_node *device, int index,
24-
struct of_phandle_args *out_irq);
23+
int of_irq_parse_oldworld(const struct device_node *device, int index,
24+
struct of_phandle_args *out_irq);
2525
#else /* CONFIG_PPC32 && CONFIG_PPC_PMAC */
2626
#define of_irq_workarounds (0)
2727
#define of_irq_dflt_pic (NULL)
28-
static inline int of_irq_parse_oldworld(struct device_node *device, int index,
28+
static inline int of_irq_parse_oldworld(const struct device_node *device, int index,
2929
struct of_phandle_args *out_irq)
3030
{
3131
return -EINVAL;

0 commit comments

Comments
 (0)