Re: [PATCH] leds-fsg: Change order of initialization anddeinitialization

From: Andrew Morton
Date: Wed Jul 30 2008 - 03:59:48 EST


On Sun, 27 Jul 2008 20:30:59 +0200 (CEST) Sven Wegener <sven.wegener@xxxxxxxxxxx> wrote:

> --- a/drivers/leds/leds-fsg.c
> +++ b/drivers/leds/leds-fsg.c
> @@ -161,6 +161,16 @@ static int fsg_led_probe(struct platform_device *pdev)
> {
> int ret;
>
> + /* Map the LED chip select address space */
> + latch_address = (unsigned short *) ioremap(IXP4XX_EXP_BUS_BASE(2), 512);
> + if (!latch_address) {
> + ret = -ENOMEM;
> + goto failremap;
> + }
> +
> + latch_value = 0xffff;
> + *latch_address = latch_value;

Mutter. Shouldn't this driver be using readw/writew? It's not even
using a volatile pointer, so there's a decent risk that the compiler
will optimise away important things..

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/