request_region - arm/mach-shark/leds.c
PATCH 1/1 request_region - arm/mach-shark/leds.c
This patch adds return value checking to request_region. No other structural changes included...
diff -ur linux-2.6.15.orig/arch/arm/mach-shark/leds.c linux-2.6.15/arch/arm/mach-shark/leds.c
--- linux-2.6.15.orig/arch/arm/mach-shark/leds.c 2006-02-04 11:00:23.000000000
-0500
+++ linux-2.6.15/arch/arm/mach-shark/leds.c 2006-02-04 15:44:32.000000000
-0500
@@ -148,11 +148,14 @@
{
extern void (*leds_event)(led_event_t); short temp;
+ struct resource *region;
leds_event = sequoia_leds_event;
/* Make LEDs independent of power-state */
- request_region(0x24,4,"sequoia");
+ region = request_region(0x24,4,"sequoia");
+ if (!region)
+ return -EBUSY;
temp = sequoia_read(0x09);
temp |= 1<<10; sequoia_write(temp,0x09);
Signature · 8 lines
Ron Gage (LPIC1, MCP, A+, Net+) Westland Michigan _______________________________________________ Kernel-janitors mailing list [email protected] https://lists.osdl.org/mailman/listinfo/kernel-janitors