From: Mark Brown Date: Thu, 7 Jan 2010 16:16:14 +0000 (+0000) Subject: mfd: WM835x GPIO direction register is not locked X-Git-Tag: MMI-PSA29.97-13-9~25116^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8e6ba2dfa2d6c4691a83a63e211990a8bd7b788b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git mfd: WM835x GPIO direction register is not locked No need to set the security key when writing to it. Signed-off-by: Mark Brown Cc: stable@kernel.org Signed-off-by: Samuel Ortiz --- diff --git a/drivers/mfd/wm8350-core.c b/drivers/mfd/wm8350-core.c index 8485a7018060..9a970bd68775 100644 --- a/drivers/mfd/wm8350-core.c +++ b/drivers/mfd/wm8350-core.c @@ -134,8 +134,7 @@ static inline int is_reg_locked(struct wm8350 *wm8350, u8 reg) wm8350->reg_cache[WM8350_SECURITY] == WM8350_UNLOCK_KEY) return 0; - if ((reg == WM8350_GPIO_CONFIGURATION_I_O) || - (reg >= WM8350_GPIO_FUNCTION_SELECT_1 && + if ((reg >= WM8350_GPIO_FUNCTION_SELECT_1 && reg <= WM8350_GPIO_FUNCTION_SELECT_4) || (reg >= WM8350_BATTERY_CHARGER_CONTROL_1 && reg <= WM8350_BATTERY_CHARGER_CONTROL_3))