提交 bb12dd42 编写于 作者: K Krzysztof Kozlowski 提交者: Michael Ellerman

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: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: NRob Herring <robh@kernel.org>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210924105653.46963-2-krzysztof.kozlowski@canonical.com
上级 cc025916
...@@ -384,7 +384,7 @@ static void __init pmac_pic_probe_oldstyle(void) ...@@ -384,7 +384,7 @@ static void __init pmac_pic_probe_oldstyle(void)
#endif #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) struct of_phandle_args *out_irq)
{ {
const u32 *ints = NULL; const u32 *ints = NULL;
......
...@@ -20,12 +20,12 @@ typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *); ...@@ -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) #if defined(CONFIG_PPC32) && defined(CONFIG_PPC_PMAC)
extern unsigned int of_irq_workarounds; extern unsigned int of_irq_workarounds;
extern struct device_node *of_irq_dflt_pic; 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); struct of_phandle_args *out_irq);
#else /* CONFIG_PPC32 && CONFIG_PPC_PMAC */ #else /* CONFIG_PPC32 && CONFIG_PPC_PMAC */
#define of_irq_workarounds (0) #define of_irq_workarounds (0)
#define of_irq_dflt_pic (NULL) #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) struct of_phandle_args *out_irq)
{ {
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册