X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-m68k%2Fblinken.h;h=1a749cf7b06d6982d224232eb40602eca03347c7;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=a6b60dec25d0f10cf34c074e19132912653f2119;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/asm-m68k/blinken.h b/include/asm-m68k/blinken.h index a6b60dec2..1a749cf7b 100644 --- a/include/asm-m68k/blinken.h +++ b/include/asm-m68k/blinken.h @@ -13,15 +13,20 @@ #define _M68K_BLINKEN_H #include +#include #define HP300_LEDS 0xf001ffff -static __inline__ void blinken_leds(int x) +extern unsigned char ledstate; + +static __inline__ void blinken_leds(int on, int off) { - if (MACH_IS_HP300) - { - *((volatile unsigned char *)HP300_LEDS) = (x); - } + if (MACH_IS_HP300) + { + ledstate |= on; + ledstate &= ~off; + out_8(HP300_LEDS, ~ledstate); + } } #endif