From: Lars-Peter Clausen Date: Thu, 18 Nov 2010 22:08:38 +0000 (+0100) Subject: gpio-charger: Fix potential race between irq handler and probe/remove X-Git-Tag: v2.6.38-rc1~56^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26eb387265872b59566ddeed5e9bf142a6b9ff5b;p=pandora-kernel.git gpio-charger: Fix potential race between irq handler and probe/remove This patch fixes a potential race between the irq handler and the probe and remove functions. The irq should not be requested before the chargers power_supply has been registered and has to be freed before the power_supply is unregistered, otherwise it is possible that the irq fires while the power_supply is not initialized yet or has already been freed. While we are at it replace request_irq with request_any_context_irq. Signed-off-by: Lars-Peter Clausen Signed-off-by: Anton Vorontsov --- Reading git-diff-tree failed