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

Commit 40d50cf7 authored by Roman Fietze's avatar Roman Fietze Committed by Benjamin Herrenschmidt
Browse files

powerpc: Make "intspec" pointers in irq_host->xlate() const



Writing a driver using SCLPC on the MPC5200B I detected, that the
intspec arrays to map irqs to Linux virq cannot be const, because the
mapping and xlate functions only take non const pointers. All those
functions do not modify the intspec, so a const pointer could be used.

Signed-off-by: default avatarRoman Fietze <roman.fietze@telemotive.de>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 990d89c6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ struct irq_host_ops {
	 * interrupt controller has for that line)
	 */
	int (*xlate)(struct irq_host *h, struct device_node *ctrler,
		     u32 *intspec, unsigned int intsize,
		     const u32 *intspec, unsigned int intsize,
		     irq_hw_number_t *out_hwirq, unsigned int *out_type);
};

@@ -314,7 +314,7 @@ extern void irq_free_virt(unsigned int virq, unsigned int count);
 * of the of_irq_map_*() functions.
 */
extern unsigned int irq_create_of_mapping(struct device_node *controller,
					  u32 *intspec, unsigned int intsize);
					  const u32 *intspec, unsigned int intsize);

/**
 * irq_of_parse_and_map - Parse and Map an interrupt into linux virq space
+1 −1
Original line number Diff line number Diff line
@@ -725,7 +725,7 @@ unsigned int irq_create_mapping(struct irq_host *host,
EXPORT_SYMBOL_GPL(irq_create_mapping);

unsigned int irq_create_of_mapping(struct device_node *controller,
				   u32 *intspec, unsigned int intsize)
				   const u32 *intspec, unsigned int intsize)
{
	struct irq_host *host;
	irq_hw_number_t hwirq;
+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ static int media5200_irq_map(struct irq_host *h, unsigned int virq,
}

static int media5200_irq_xlate(struct irq_host *h, struct device_node *ct,
				 u32 *intspec, unsigned int intsize,
				 const u32 *intspec, unsigned int intsize,
				 irq_hw_number_t *out_hwirq,
				 unsigned int *out_flags)
{
+1 −1
Original line number Diff line number Diff line
@@ -214,7 +214,7 @@ static int mpc52xx_gpt_irq_map(struct irq_host *h, unsigned int virq,
}

static int mpc52xx_gpt_irq_xlate(struct irq_host *h, struct device_node *ct,
				 u32 *intspec, unsigned int intsize,
				 const u32 *intspec, unsigned int intsize,
				 irq_hw_number_t *out_hwirq,
				 unsigned int *out_flags)
{
+1 −1
Original line number Diff line number Diff line
@@ -355,7 +355,7 @@ static int mpc52xx_is_extirq(int l1, int l2)
 * mpc52xx_irqhost_xlate - translate virq# from device tree interrupts property
 */
static int mpc52xx_irqhost_xlate(struct irq_host *h, struct device_node *ct,
				 u32 *intspec, unsigned int intsize,
				 const u32 *intspec, unsigned int intsize,
				 irq_hw_number_t *out_hwirq,
				 unsigned int *out_flags)
{
Loading