From: Johan Hovold Date: Mon, 4 May 2015 15:10:28 +0000 (+0200) Subject: gpio: sysfs: fix redundant lock-as-irq handling X-Git-Tag: omap-for-v4.3/legacy-v2-signed~191^2~52 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52176d0d3be29ccb01a44ee77532bb3969939ecf;p=pandora-kernel.git gpio: sysfs: fix redundant lock-as-irq handling Drivers should call gpiochip_lock_as_irq (which prevents the pin direction from being changed) in their irq_request_resources callbacks but some drivers currently fail to do so. Instead a second, explicit and often redundant call to lock-as-irq is made by the sysfs-interface implementation after an irq has been requested. Move the explicit call before the irq-request to match the unlock done after the irq is later released. Note that this also fixes an irq leak, should the explicit call ever have failed. Also add a comment about removing the redundant call once the broken drivers have been fixed. Signed-off-by: Johan Hovold Reviewed-by: Alexandre Courbot Signed-off-by: Linus Walleij --- Reading git-diff-tree failed