summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2011-04-26 14:05:11 +0530
committerUlf Hansson <ulf.hansson@stericsson.com>2011-09-19 15:15:10 +0200
commit540d895ebe97507f2c7fbd3c8d5720f38fff41d2 (patch)
tree2b431bc98bd71705bd942b8658faa930b04ae20b /drivers/input
parent09e10365574ce400accb81dc331e89e24c797694 (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')
-rw-r--r--drivers/input/keyboard/db5500_keypad.c23
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));