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: Roman Fietze <roman.fietze@telemotive.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
committed by
Benjamin Herrenschmidt
parent
990d89c663
commit
40d50cf7ca
@@ -166,11 +166,11 @@ static void beatic_pic_host_remap(struct irq_host *h, unsigned int virq,
|
||||
* Note: We have only 1 entry to translate.
|
||||
*/
|
||||
static int beatic_pic_host_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)
|
||||
{
|
||||
u64 *intspec2 = (u64 *)intspec;
|
||||
const u64 *intspec2 = (const u64 *)intspec;
|
||||
|
||||
*out_hwirq = *intspec2;
|
||||
*out_flags |= IRQ_TYPE_LEVEL_LOW;
|
||||
|
Reference in New Issue
Block a user