summaryrefslogtreecommitdiff
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-03-26 10:27:08 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-09-03 16:00:44 +0100
commit924e5ea2ce0f6addb8b098760d840b0923573d19 (patch)
tree34a2673b995aa0d487ca5c6e1def05778fc1d77a /drivers/pcmcia
parent8e2caf0d21a7059d8b56cb19d5d0182a28b1eabc (diff)
downloadlwn-924e5ea2ce0f6addb8b098760d840b0923573d19.tar.gz
lwn-924e5ea2ce0f6addb8b098760d840b0923573d19.zip
pcmcia: sa1111: update socket driver to use devm_clk_get() API
Update the pxa2xx socket driver to use the devm_clk_get() API so that the cleanup paths are simplified. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/sa1111_generic.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c
index 80b8e9d05275..fb902af8a5b7 100644
--- a/drivers/pcmcia/sa1111_generic.c
+++ b/drivers/pcmcia/sa1111_generic.c
@@ -145,7 +145,7 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
return -ENOMEM;
s->soc.nr = ops->first + i;
- s->soc.clk = clk_get(&dev->dev, NULL);
+ s->soc.clk = devm_clk_get(&dev->dev, NULL);
if (IS_ERR(s->soc.clk)) {
ret = PTR_ERR(s->soc.clk);
kfree(s);
@@ -226,7 +226,6 @@ static int pcmcia_remove(struct sa1111_dev *dev)
for (; s; s = next) {
next = s->next;
soc_pcmcia_remove_one(&s->soc);
- clk_put(s->soc.clk);
kfree(s);
}