aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2014-12-03 12:42:13 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-12-05 11:30:29 -0500
commitb02cba8693fca6bd9166dd541f6a61cd82f6e231 (patch)
tree86ecfd9783c8baeed6e49f5c9416a9f8462ff7ed /drivers/pcmcia
parent0821c3bc5df805aef1f5989b7a7dacc2491a0e5b (diff)
ARM: 8246/2: pcmcia: sa1111: provide device clock
Both pxa2xx (long ago) and sa1100 (now) make use of clock device to get the cpu speed. Make sa1111 glue code provide clock to platform layer. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/sa1111_generic.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c
index 65b02c3e14ce..7bae7e549d8b 100644
--- a/drivers/pcmcia/sa1111_generic.c
+++ b/drivers/pcmcia/sa1111_generic.c
@@ -145,6 +145,12 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
145 return -ENOMEM; 145 return -ENOMEM;
146 146
147 s->soc.nr = ops->first + i; 147 s->soc.nr = ops->first + i;
148 s->soc.clk = clk_get(&dev->dev, NULL);
149 if (IS_ERR(s->soc.clk)) {
150 ret = PTR_ERR(s->soc.clk);
151 kfree(s);
152 return ret;
153 }
148 soc_pcmcia_init_one(&s->soc, ops, &dev->dev); 154 soc_pcmcia_init_one(&s->soc, ops, &dev->dev);
149 s->dev = dev; 155 s->dev = dev;
150 if (s->soc.nr) { 156 if (s->soc.nr) {
@@ -220,6 +226,7 @@ static int pcmcia_remove(struct sa1111_dev *dev)
220 for (; s; s = next) { 226 for (; s; s = next) {
221 next = s->next; 227 next = s->next;
222 soc_pcmcia_remove_one(&s->soc); 228 soc_pcmcia_remove_one(&s->soc);
229 clk_put(s->soc.clk);
223 kfree(s); 230 kfree(s);
224 } 231 }
225 232