smb347-charger: Move IRQ enabling to the end of probe
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 16 Apr 2012 08:48:40 +0000 (11:48 +0300)
committerAnton Vorontsov <anton.vorontsov@linaro.org>
Sat, 5 May 2012 12:35:47 +0000 (05:35 -0700)
commitd72bade76d11da661d76aec5801567d573f39fea
tree674cc60de51bb548dbb590fdc7b4d911822d83b9
parent055d7f0f29b2af6ec8fd5da9f0ce27b9e9e63436
smb347-charger: Move IRQ enabling to the end of probe

There is a potential problem if we call smb347_irq_enable() from
smb347_irq_init() because smb347_irq_enable() makes the device registers
read-only once it returns and smb347_irq_init() expects them to still be
read-write. Currently no harm happens because it is the last call we make
in smb347_irq_init().

Anyway a better place for enabling IRQs is at the end of probe function
and this is also symmetric to call smb347_irq_disable() which is done at
the beginning of remove function.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
drivers/power/smb347-charger.c
This page took 0.02836 seconds and 5 git commands to generate.