lkml.org 
[lkml]   [2008]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] leds-fsg: Change order of initialization and deinitialization
On Sun, 27 Jul 2008 20:30:59 +0200 (CEST) Sven Wegener <sven.wegener@stealer.net> 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..



\
 
 \ /
  Last update: 2008-07-30 10:01    [W:0.334 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site