From a1e636e6d35944a2b970481b78a621774276acfd Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 6 Jul 2012 11:26:05 -0700 Subject: Input: imx_keypad - use clk_prepare_enable/clk_disable_unprepare() Adapt clock handling to the new i.mx clock framework and fix the following warning: input: imx-keypad as /devices/platform/imx-keypad/input/input0 ------------[ cut here ]------------ WARNING: at drivers/clk/clk.c:511 __clk_enable+0x98/0xa8() Modules linked in: [] (unwind_backtrace+0x0/0xf4) from [] (warn_slowpath_commo) [] (warn_slowpath_common+0x48/0x60) from [] (warn_slowpath_) [] (warn_slowpath_null+0x1c/0x24) from [] (__clk_enable+0x9) [] (__clk_enable+0x98/0xa8) from [] (clk_enable+0x24/0x5c) [] (clk_enable+0x24/0x5c) from [] (imx_keypad_open+0x28/0xc) [] (imx_keypad_open+0x28/0xc8) from [] (input_open_device+0) [] (input_open_device+0x78/0xa8) from [] (kbd_connect+0x60/) [] (kbd_connect+0x60/0x80) from [] (input_attach_handler+0x) [] (input_attach_handler+0x220/0x258) from [] (input_regist) [] (input_register_device+0x31c/0x390) from [] (imx_keypad_) [] (imx_keypad_probe+0x2e4/0x3b8) from [] (platform_drv_pro) [] (platform_drv_probe+0x18/0x1c) from [] (driver_probe_dev) [] (driver_probe_device+0x84/0x210) from [] (__driver_attac) [] (__driver_attach+0x8c/0x90) from [] (bus_for_each_dev+0x) [] (bus_for_each_dev+0x68/0x90) from [] (bus_add_driver+0xa) [] (bus_add_driver+0xa4/0x23c) from [] (driver_register+0x7) [] (driver_register+0x78/0x12c) from [] (do_one_initcall+0x) [] (do_one_initcall+0x34/0x188) from [] (kernel_init+0xe4/0) [] (kernel_init+0xe4/0x1a8) from [] (kernel_thread_exit+0x0) ---[ end trace 1d550e891d03d7ce ]--- Signed-off-by: Fabio Estevam Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/imx_keypad.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index 6ee7421e232..9d57945db53 100644 --- a/drivers/input/keyboard/imx_keypad.c +++ b/drivers/input/keyboard/imx_keypad.c @@ -378,7 +378,7 @@ static void imx_keypad_close(struct input_dev *dev) imx_keypad_inhibit(keypad); /* Disable clock unit */ - clk_disable(keypad->clk); + clk_disable_unprepare(keypad->clk); } static int imx_keypad_open(struct input_dev *dev) @@ -391,7 +391,7 @@ static int imx_keypad_open(struct input_dev *dev) keypad->enabled = true; /* Enable the kpp clock */ - clk_enable(keypad->clk); + clk_prepare_enable(keypad->clk); imx_keypad_config(keypad); /* Sanity control, not all the rows must be actived now. */ @@ -581,7 +581,7 @@ static int imx_kbd_suspend(struct device *dev) mutex_lock(&input_dev->mutex); if (input_dev->users) - clk_disable(kbd->clk); + clk_disable_unprepare(kbd->clk); mutex_unlock(&input_dev->mutex); @@ -603,7 +603,7 @@ static int imx_kbd_resume(struct device *dev) mutex_lock(&input_dev->mutex); if (input_dev->users) - clk_enable(kbd->clk); + clk_prepare_enable(kbd->clk); mutex_unlock(&input_dev->mutex); -- cgit v1.2.3-70-g09d2