diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2011-04-26 14:05:11 +0530 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:03:31 +0200 |
commit | a2db8d3ad080f5e8696c8510568546f5b412028f (patch) | |
tree | 33ffa5d75869220e6e0df2e8152947dffd592548 /drivers/input/keyboard | |
parent | 2dcab8618aaf3a2ddabcab3acedf712afb695d30 (diff) |
db5500-keypad: remove clk hacks
Now that we have a clock framework in place, remove these hacks.
ST-Ericsson Linux next: -
ST-Ericsson ID: WP264487
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I41feadd787132c4c03509d47ddd73400d81cafae
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/21574
Reviewed-by: Naveen Kumar GADDIPATI <naveen.gaddipati@stericsson.com>
Reviewed-by: QATEST
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/db5500_keypad.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/input/keyboard/db5500_keypad.c b/drivers/input/keyboard/db5500_keypad.c index a6d0fe08961..398cf83a05f 100644 --- a/drivers/input/keyboard/db5500_keypad.c +++ b/drivers/input/keyboard/db5500_keypad.c @@ -244,11 +244,8 @@ static int __devinit db5500_keypad_probe(struct platform_device *pdev) clk = clk_get(&pdev->dev, NULL); if (IS_ERR(clk)) { dev_err(&pdev->dev, "failed to clk_get\n"); - - /* - * FIXME: error out here once DB5500 clock framework is in - * place, and remove all the !IS_ERR(clk) checks. - */ + ret = PTR_ERR(clk); + goto out_iounmap; } keypad = kzalloc(sizeof(struct db5500_keypad), GFP_KERNEL); @@ -296,8 +293,7 @@ static int __devinit db5500_keypad_probe(struct platform_device *pdev) keypad->clk = clk; /* allocations are sane, we begin HW initialization */ - if (!IS_ERR(keypad->clk)) - clk_enable(keypad->clk); + clk_enable(keypad->clk); ret = db5500_keypad_chip_init(keypad); if (ret < 0) { @@ -321,15 +317,14 @@ static int __devinit db5500_keypad_probe(struct platform_device *pdev) out_unregisterinput: input_unregister_device(input); input = NULL; - if (!IS_ERR(keypad->clk)) - clk_disable(keypad->clk); + clk_disable(keypad->clk); out_freeinput: input_free_device(input); out_freekeypad: kfree(keypad); out_freeclk: - if (!IS_ERR(clk)) - clk_put(clk); + clk_put(clk); +out_iounmap: iounmap(base); out_freerequest_memregions: release_mem_region(res->start, resource_size(res)); @@ -345,10 +340,8 @@ static int __devexit db5500_keypad_remove(struct platform_device *pdev) free_irq(keypad->irq, keypad); input_unregister_device(keypad->input); - if (!IS_ERR(keypad->clk)) { - clk_disable(keypad->clk); - clk_put(keypad->clk); - } + clk_disable(keypad->clk); + clk_put(keypad->clk); iounmap(keypad->base); release_mem_region(res->start, resource_size(res)); |