From: Thadeu Lima de Souza Cascardo Date: Wed, 26 Aug 2009 21:29:31 +0000 (-0700) Subject: leds: fix multiple requests and releases of IRQ for GPIO LED Trigger X-Git-Tag: v2.6.31-rc8~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48cccd26f36511ddb6aeca07485ecf2829683907;p=pandora-kernel.git leds: fix multiple requests and releases of IRQ for GPIO LED Trigger When setting the same GPIO number, multiple IRQ shared requests will be done without freing the previous request. It will also try to free a failed request or an already freed IRQ if 0 was written to the gpio file. All these oops and leaks were fixed with the following solution: keep the previous allocated GPIO (if any) still allocated in case the new request fails. The alternative solution would desallocate the previous allocated GPIO and set gpio as 0. Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Samuel R. C. Vale Cc: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed