This adds little endian support while keeping big endian support. Signed-off-by: Álvaro Fernández Rojas <noltari@xxxxxxxxx> --- v2: add little endian support instead of switch to __raw io drivers/leds/leds-bcm6358.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/leds/leds-bcm6358.c b/drivers/leds/leds-bcm6358.c index ab09ea4..ffc978d 100644 --- a/drivers/leds/leds-bcm6358.c +++ b/drivers/leds/leds-bcm6358.c @@ -49,12 +49,20 @@ struct bcm6358_led { static void bcm6358_led_write(void __iomem *reg, unsigned long data) { +#ifdef CONFIG_CPU_BIG_ENDIAN iowrite32be(data, reg); +#else + writel(data, reg); +#endif } static unsigned long bcm6358_led_read(void __iomem *reg) { +#ifdef CONFIG_CPU_BIG_ENDIAN return ioread32be(reg); +#else + return readl(reg); +#endif } static unsigned long bcm6358_led_busy(void __iomem *mem) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-leds" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html