diff options
-rw-r--r-- | arch/arm/mach-aaec2000/clock.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-integrator/clock.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-realview/clock.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/clock.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/clock.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/time.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-versatile/clock.c | 11 | ||||
-rw-r--r-- | drivers/char/watchdog/s3c2410_wdt.c | 2 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-s3c2410.c | 2 | ||||
-rw-r--r-- | drivers/input/serio/ambakmi.c | 9 | ||||
-rw-r--r-- | drivers/mmc/mmci.c | 9 | ||||
-rw-r--r-- | drivers/mtd/nand/s3c2410.c | 2 | ||||
-rw-r--r-- | drivers/serial/amba-pl011.c | 7 | ||||
-rw-r--r-- | drivers/serial/s3c2410.c | 5 | ||||
-rw-r--r-- | drivers/usb/host/ohci-s3c2410.c | 2 | ||||
-rw-r--r-- | drivers/video/amba-clcd.c | 9 | ||||
-rw-r--r-- | drivers/video/s3c2410fb.c | 3 | ||||
-rw-r--r-- | include/asm-arm/hardware/clock.h | 14 |
18 files changed, 3 insertions, 122 deletions
diff --git a/arch/arm/mach-aaec2000/clock.c b/arch/arm/mach-aaec2000/clock.c index 0340ddc4824e..828208348b76 100644 --- a/arch/arm/mach-aaec2000/clock.c +++ b/arch/arm/mach-aaec2000/clock.c | |||
@@ -58,17 +58,6 @@ void clk_disable(struct clk *clk) | |||
58 | } | 58 | } |
59 | EXPORT_SYMBOL(clk_disable); | 59 | EXPORT_SYMBOL(clk_disable); |
60 | 60 | ||
61 | int clk_use(struct clk *clk) | ||
62 | { | ||
63 | return 0; | ||
64 | } | ||
65 | EXPORT_SYMBOL(clk_use); | ||
66 | |||
67 | void clk_unuse(struct clk *clk) | ||
68 | { | ||
69 | } | ||
70 | EXPORT_SYMBOL(clk_unuse); | ||
71 | |||
72 | unsigned long clk_get_rate(struct clk *clk) | 61 | unsigned long clk_get_rate(struct clk *clk) |
73 | { | 62 | { |
74 | return clk->rate; | 63 | return clk->rate; |
diff --git a/arch/arm/mach-integrator/clock.c b/arch/arm/mach-integrator/clock.c index 73c360685cad..bbfe46cd91fe 100644 --- a/arch/arm/mach-integrator/clock.c +++ b/arch/arm/mach-integrator/clock.c | |||
@@ -58,17 +58,6 @@ void clk_disable(struct clk *clk) | |||
58 | } | 58 | } |
59 | EXPORT_SYMBOL(clk_disable); | 59 | EXPORT_SYMBOL(clk_disable); |
60 | 60 | ||
61 | int clk_use(struct clk *clk) | ||
62 | { | ||
63 | return 0; | ||
64 | } | ||
65 | EXPORT_SYMBOL(clk_use); | ||
66 | |||
67 | void clk_unuse(struct clk *clk) | ||
68 | { | ||
69 | } | ||
70 | EXPORT_SYMBOL(clk_unuse); | ||
71 | |||
72 | unsigned long clk_get_rate(struct clk *clk) | 61 | unsigned long clk_get_rate(struct clk *clk) |
73 | { | 62 | { |
74 | return clk->rate; | 63 | return clk->rate; |
diff --git a/arch/arm/mach-realview/clock.c b/arch/arm/mach-realview/clock.c index 002635c97bb6..331e1b483aa7 100644 --- a/arch/arm/mach-realview/clock.c +++ b/arch/arm/mach-realview/clock.c | |||
@@ -57,17 +57,6 @@ void clk_disable(struct clk *clk) | |||
57 | } | 57 | } |
58 | EXPORT_SYMBOL(clk_disable); | 58 | EXPORT_SYMBOL(clk_disable); |
59 | 59 | ||
60 | int clk_use(struct clk *clk) | ||
61 | { | ||
62 | return 0; | ||
63 | } | ||
64 | EXPORT_SYMBOL(clk_use); | ||
65 | |||
66 | void clk_unuse(struct clk *clk) | ||
67 | { | ||
68 | } | ||
69 | EXPORT_SYMBOL(clk_unuse); | ||
70 | |||
71 | unsigned long clk_get_rate(struct clk *clk) | 60 | unsigned long clk_get_rate(struct clk *clk) |
72 | { | 61 | { |
73 | return clk->rate; | 62 | return clk->rate; |
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c index 82e8253b1fa0..77f321fac281 100644 --- a/arch/arm/mach-s3c2410/clock.c +++ b/arch/arm/mach-s3c2410/clock.c | |||
@@ -151,18 +151,6 @@ void clk_disable(struct clk *clk) | |||
151 | } | 151 | } |
152 | 152 | ||
153 | 153 | ||
154 | int clk_use(struct clk *clk) | ||
155 | { | ||
156 | atomic_inc(&clk->used); | ||
157 | return 0; | ||
158 | } | ||
159 | |||
160 | |||
161 | void clk_unuse(struct clk *clk) | ||
162 | { | ||
163 | atomic_dec(&clk->used); | ||
164 | } | ||
165 | |||
166 | unsigned long clk_get_rate(struct clk *clk) | 154 | unsigned long clk_get_rate(struct clk *clk) |
167 | { | 155 | { |
168 | if (IS_ERR(clk)) | 156 | if (IS_ERR(clk)) |
@@ -196,8 +184,6 @@ EXPORT_SYMBOL(clk_get); | |||
196 | EXPORT_SYMBOL(clk_put); | 184 | EXPORT_SYMBOL(clk_put); |
197 | EXPORT_SYMBOL(clk_enable); | 185 | EXPORT_SYMBOL(clk_enable); |
198 | EXPORT_SYMBOL(clk_disable); | 186 | EXPORT_SYMBOL(clk_disable); |
199 | EXPORT_SYMBOL(clk_use); | ||
200 | EXPORT_SYMBOL(clk_unuse); | ||
201 | EXPORT_SYMBOL(clk_get_rate); | 187 | EXPORT_SYMBOL(clk_get_rate); |
202 | EXPORT_SYMBOL(clk_round_rate); | 188 | EXPORT_SYMBOL(clk_round_rate); |
203 | EXPORT_SYMBOL(clk_set_rate); | 189 | EXPORT_SYMBOL(clk_set_rate); |
@@ -370,7 +356,6 @@ static struct clk init_clocks[] = { | |||
370 | int s3c24xx_register_clock(struct clk *clk) | 356 | int s3c24xx_register_clock(struct clk *clk) |
371 | { | 357 | { |
372 | clk->owner = THIS_MODULE; | 358 | clk->owner = THIS_MODULE; |
373 | atomic_set(&clk->used, 0); | ||
374 | 359 | ||
375 | if (clk->enable == NULL) | 360 | if (clk->enable == NULL) |
376 | clk->enable = clk_null_enable; | 361 | clk->enable = clk_null_enable; |
diff --git a/arch/arm/mach-s3c2410/clock.h b/arch/arm/mach-s3c2410/clock.h index 7953b6f397b9..177d5c8decf7 100644 --- a/arch/arm/mach-s3c2410/clock.h +++ b/arch/arm/mach-s3c2410/clock.h | |||
@@ -16,7 +16,6 @@ struct clk { | |||
16 | struct clk *parent; | 16 | struct clk *parent; |
17 | const char *name; | 17 | const char *name; |
18 | int id; | 18 | int id; |
19 | atomic_t used; | ||
20 | unsigned long rate; | 19 | unsigned long rate; |
21 | unsigned long ctrlbit; | 20 | unsigned long ctrlbit; |
22 | int (*enable)(struct clk *, int enable); | 21 | int (*enable)(struct clk *, int enable); |
diff --git a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c index 8a00e3c3cd08..9acda44b25a6 100644 --- a/arch/arm/mach-s3c2410/time.c +++ b/arch/arm/mach-s3c2410/time.c | |||
@@ -191,7 +191,6 @@ static void s3c2410_timer_setup (void) | |||
191 | if (IS_ERR(clk)) | 191 | if (IS_ERR(clk)) |
192 | panic("failed to get clock for system timer"); | 192 | panic("failed to get clock for system timer"); |
193 | 193 | ||
194 | clk_use(clk); | ||
195 | clk_enable(clk); | 194 | clk_enable(clk); |
196 | 195 | ||
197 | pclk = clk_get_rate(clk); | 196 | pclk = clk_get_rate(clk); |
diff --git a/arch/arm/mach-versatile/clock.c b/arch/arm/mach-versatile/clock.c index b96a2ea15d41..ada3142da8dc 100644 --- a/arch/arm/mach-versatile/clock.c +++ b/arch/arm/mach-versatile/clock.c | |||
@@ -58,17 +58,6 @@ void clk_disable(struct clk *clk) | |||
58 | } | 58 | } |
59 | EXPORT_SYMBOL(clk_disable); | 59 | EXPORT_SYMBOL(clk_disable); |
60 | 60 | ||
61 | int clk_use(struct clk *clk) | ||
62 | { | ||
63 | return 0; | ||
64 | } | ||
65 | EXPORT_SYMBOL(clk_use); | ||
66 | |||
67 | void clk_unuse(struct clk *clk) | ||
68 | { | ||
69 | } | ||
70 | EXPORT_SYMBOL(clk_unuse); | ||
71 | |||
72 | unsigned long clk_get_rate(struct clk *clk) | 61 | unsigned long clk_get_rate(struct clk *clk) |
73 | { | 62 | { |
74 | return clk->rate; | 63 | return clk->rate; |
diff --git a/drivers/char/watchdog/s3c2410_wdt.c b/drivers/char/watchdog/s3c2410_wdt.c index eb667daee19b..621e8a99e733 100644 --- a/drivers/char/watchdog/s3c2410_wdt.c +++ b/drivers/char/watchdog/s3c2410_wdt.c | |||
@@ -397,7 +397,6 @@ static int s3c2410wdt_probe(struct platform_device *pdev) | |||
397 | return -ENOENT; | 397 | return -ENOENT; |
398 | } | 398 | } |
399 | 399 | ||
400 | clk_use(wdt_clock); | ||
401 | clk_enable(wdt_clock); | 400 | clk_enable(wdt_clock); |
402 | 401 | ||
403 | /* see if we can actually set the requested timer margin, and if | 402 | /* see if we can actually set the requested timer margin, and if |
@@ -444,7 +443,6 @@ static int s3c2410wdt_remove(struct platform_device *dev) | |||
444 | 443 | ||
445 | if (wdt_clock != NULL) { | 444 | if (wdt_clock != NULL) { |
446 | clk_disable(wdt_clock); | 445 | clk_disable(wdt_clock); |
447 | clk_unuse(wdt_clock); | ||
448 | clk_put(wdt_clock); | 446 | clk_put(wdt_clock); |
449 | wdt_clock = NULL; | 447 | wdt_clock = NULL; |
450 | } | 448 | } |
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 58cfd3111ef6..2a2f86d8c2d8 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c | |||
@@ -738,7 +738,6 @@ static void s3c24xx_i2c_free(struct s3c24xx_i2c *i2c) | |||
738 | { | 738 | { |
739 | if (i2c->clk != NULL && !IS_ERR(i2c->clk)) { | 739 | if (i2c->clk != NULL && !IS_ERR(i2c->clk)) { |
740 | clk_disable(i2c->clk); | 740 | clk_disable(i2c->clk); |
741 | clk_unuse(i2c->clk); | ||
742 | clk_put(i2c->clk); | 741 | clk_put(i2c->clk); |
743 | i2c->clk = NULL; | 742 | i2c->clk = NULL; |
744 | } | 743 | } |
@@ -778,7 +777,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) | |||
778 | 777 | ||
779 | dev_dbg(&pdev->dev, "clock source %p\n", i2c->clk); | 778 | dev_dbg(&pdev->dev, "clock source %p\n", i2c->clk); |
780 | 779 | ||
781 | clk_use(i2c->clk); | ||
782 | clk_enable(i2c->clk); | 780 | clk_enable(i2c->clk); |
783 | 781 | ||
784 | /* map the registers */ | 782 | /* map the registers */ |
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c index 9b1ab5e7a98d..d847ed51cfb1 100644 --- a/drivers/input/serio/ambakmi.c +++ b/drivers/input/serio/ambakmi.c | |||
@@ -72,13 +72,9 @@ static int amba_kmi_open(struct serio *io) | |||
72 | unsigned int divisor; | 72 | unsigned int divisor; |
73 | int ret; | 73 | int ret; |
74 | 74 | ||
75 | ret = clk_use(kmi->clk); | ||
76 | if (ret) | ||
77 | goto out; | ||
78 | |||
79 | ret = clk_enable(kmi->clk); | 75 | ret = clk_enable(kmi->clk); |
80 | if (ret) | 76 | if (ret) |
81 | goto clk_unuse; | 77 | goto out; |
82 | 78 | ||
83 | divisor = clk_get_rate(kmi->clk) / 8000000 - 1; | 79 | divisor = clk_get_rate(kmi->clk) / 8000000 - 1; |
84 | writeb(divisor, KMICLKDIV); | 80 | writeb(divisor, KMICLKDIV); |
@@ -97,8 +93,6 @@ static int amba_kmi_open(struct serio *io) | |||
97 | 93 | ||
98 | clk_disable: | 94 | clk_disable: |
99 | clk_disable(kmi->clk); | 95 | clk_disable(kmi->clk); |
100 | clk_unuse: | ||
101 | clk_unuse(kmi->clk); | ||
102 | out: | 96 | out: |
103 | return ret; | 97 | return ret; |
104 | } | 98 | } |
@@ -111,7 +105,6 @@ static void amba_kmi_close(struct serio *io) | |||
111 | 105 | ||
112 | free_irq(kmi->irq, kmi); | 106 | free_irq(kmi->irq, kmi); |
113 | clk_disable(kmi->clk); | 107 | clk_disable(kmi->clk); |
114 | clk_unuse(kmi->clk); | ||
115 | } | 108 | } |
116 | 109 | ||
117 | static int amba_kmi_probe(struct amba_device *dev, void *id) | 110 | static int amba_kmi_probe(struct amba_device *dev, void *id) |
diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c index 166c9b0ad04e..31b0b6d612bf 100644 --- a/drivers/mmc/mmci.c +++ b/drivers/mmc/mmci.c | |||
@@ -479,13 +479,9 @@ static int mmci_probe(struct amba_device *dev, void *id) | |||
479 | goto host_free; | 479 | goto host_free; |
480 | } | 480 | } |
481 | 481 | ||
482 | ret = clk_use(host->clk); | ||
483 | if (ret) | ||
484 | goto clk_free; | ||
485 | |||
486 | ret = clk_enable(host->clk); | 482 | ret = clk_enable(host->clk); |
487 | if (ret) | 483 | if (ret) |
488 | goto clk_unuse; | 484 | goto clk_free; |
489 | 485 | ||
490 | host->plat = plat; | 486 | host->plat = plat; |
491 | host->mclk = clk_get_rate(host->clk); | 487 | host->mclk = clk_get_rate(host->clk); |
@@ -558,8 +554,6 @@ static int mmci_probe(struct amba_device *dev, void *id) | |||
558 | iounmap(host->base); | 554 | iounmap(host->base); |
559 | clk_disable: | 555 | clk_disable: |
560 | clk_disable(host->clk); | 556 | clk_disable(host->clk); |
561 | clk_unuse: | ||
562 | clk_unuse(host->clk); | ||
563 | clk_free: | 557 | clk_free: |
564 | clk_put(host->clk); | 558 | clk_put(host->clk); |
565 | host_free: | 559 | host_free: |
@@ -594,7 +588,6 @@ static int mmci_remove(struct amba_device *dev) | |||
594 | 588 | ||
595 | iounmap(host->base); | 589 | iounmap(host->base); |
596 | clk_disable(host->clk); | 590 | clk_disable(host->clk); |
597 | clk_unuse(host->clk); | ||
598 | clk_put(host->clk); | 591 | clk_put(host->clk); |
599 | 592 | ||
600 | mmc_free_host(mmc); | 593 | mmc_free_host(mmc); |
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index d209214b1318..b796a9a6b924 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c | |||
@@ -460,7 +460,6 @@ static int s3c2410_nand_remove(struct platform_device *pdev) | |||
460 | 460 | ||
461 | if (info->clk != NULL && !IS_ERR(info->clk)) { | 461 | if (info->clk != NULL && !IS_ERR(info->clk)) { |
462 | clk_disable(info->clk); | 462 | clk_disable(info->clk); |
463 | clk_unuse(info->clk); | ||
464 | clk_put(info->clk); | 463 | clk_put(info->clk); |
465 | } | 464 | } |
466 | 465 | ||
@@ -598,7 +597,6 @@ static int s3c24xx_nand_probe(struct platform_device *pdev, int is_s3c2440) | |||
598 | goto exit_error; | 597 | goto exit_error; |
599 | } | 598 | } |
600 | 599 | ||
601 | clk_use(info->clk); | ||
602 | clk_enable(info->clk); | 600 | clk_enable(info->clk); |
603 | 601 | ||
604 | /* allocate and map the resource */ | 602 | /* allocate and map the resource */ |
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index d84476ee6592..531b0e4f25e5 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c | |||
@@ -761,10 +761,6 @@ static int pl011_probe(struct amba_device *dev, void *id) | |||
761 | goto unmap; | 761 | goto unmap; |
762 | } | 762 | } |
763 | 763 | ||
764 | ret = clk_use(uap->clk); | ||
765 | if (ret) | ||
766 | goto putclk; | ||
767 | |||
768 | uap->port.dev = &dev->dev; | 764 | uap->port.dev = &dev->dev; |
769 | uap->port.mapbase = dev->res.start; | 765 | uap->port.mapbase = dev->res.start; |
770 | uap->port.membase = base; | 766 | uap->port.membase = base; |
@@ -782,8 +778,6 @@ static int pl011_probe(struct amba_device *dev, void *id) | |||
782 | if (ret) { | 778 | if (ret) { |
783 | amba_set_drvdata(dev, NULL); | 779 | amba_set_drvdata(dev, NULL); |
784 | amba_ports[i] = NULL; | 780 | amba_ports[i] = NULL; |
785 | clk_unuse(uap->clk); | ||
786 | putclk: | ||
787 | clk_put(uap->clk); | 781 | clk_put(uap->clk); |
788 | unmap: | 782 | unmap: |
789 | iounmap(base); | 783 | iounmap(base); |
@@ -808,7 +802,6 @@ static int pl011_remove(struct amba_device *dev) | |||
808 | amba_ports[i] = NULL; | 802 | amba_ports[i] = NULL; |
809 | 803 | ||
810 | iounmap(uap->port.membase); | 804 | iounmap(uap->port.membase); |
811 | clk_unuse(uap->clk); | ||
812 | clk_put(uap->clk); | 805 | clk_put(uap->clk); |
813 | kfree(uap); | 806 | kfree(uap); |
814 | return 0; | 807 | return 0; |
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c index 47681c4654e4..eb47f5b71aeb 100644 --- a/drivers/serial/s3c2410.c +++ b/drivers/serial/s3c2410.c | |||
@@ -782,11 +782,9 @@ static void s3c24xx_serial_set_termios(struct uart_port *port, | |||
782 | 782 | ||
783 | if (ourport->baudclk != NULL && !IS_ERR(ourport->baudclk)) { | 783 | if (ourport->baudclk != NULL && !IS_ERR(ourport->baudclk)) { |
784 | clk_disable(ourport->baudclk); | 784 | clk_disable(ourport->baudclk); |
785 | clk_unuse(ourport->baudclk); | ||
786 | ourport->baudclk = NULL; | 785 | ourport->baudclk = NULL; |
787 | } | 786 | } |
788 | 787 | ||
789 | clk_use(clk); | ||
790 | clk_enable(clk); | 788 | clk_enable(clk); |
791 | 789 | ||
792 | ourport->clksrc = clksrc; | 790 | ourport->clksrc = clksrc; |
@@ -1077,9 +1075,6 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, | |||
1077 | 1075 | ||
1078 | ourport->clk = clk_get(&platdev->dev, "uart"); | 1076 | ourport->clk = clk_get(&platdev->dev, "uart"); |
1079 | 1077 | ||
1080 | if (ourport->clk != NULL && !IS_ERR(ourport->clk)) | ||
1081 | clk_use(ourport->clk); | ||
1082 | |||
1083 | dbg("port: map=%08x, mem=%08x, irq=%d, clock=%ld\n", | 1078 | dbg("port: map=%08x, mem=%08x, irq=%d, clock=%ld\n", |
1084 | port->mapbase, port->membase, port->irq, port->uartclk); | 1079 | port->mapbase, port->membase, port->irq, port->uartclk); |
1085 | 1080 | ||
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c index 35cc9402adc0..add198a4be79 100644 --- a/drivers/usb/host/ohci-s3c2410.c +++ b/drivers/usb/host/ohci-s3c2410.c | |||
@@ -363,7 +363,6 @@ int usb_hcd_s3c2410_probe (const struct hc_driver *driver, | |||
363 | goto err1; | 363 | goto err1; |
364 | } | 364 | } |
365 | 365 | ||
366 | clk_use(clk); | ||
367 | s3c2410_start_hc(dev, hcd); | 366 | s3c2410_start_hc(dev, hcd); |
368 | 367 | ||
369 | hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); | 368 | hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); |
@@ -384,7 +383,6 @@ int usb_hcd_s3c2410_probe (const struct hc_driver *driver, | |||
384 | err2: | 383 | err2: |
385 | s3c2410_stop_hc(dev); | 384 | s3c2410_stop_hc(dev); |
386 | iounmap(hcd->regs); | 385 | iounmap(hcd->regs); |
387 | clk_unuse(clk); | ||
388 | clk_put(clk); | 386 | clk_put(clk); |
389 | 387 | ||
390 | err1: | 388 | err1: |
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index a3c2c45e29e0..69421c86252c 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c | |||
@@ -346,10 +346,6 @@ static int clcdfb_register(struct clcd_fb *fb) | |||
346 | goto out; | 346 | goto out; |
347 | } | 347 | } |
348 | 348 | ||
349 | ret = clk_use(fb->clk); | ||
350 | if (ret) | ||
351 | goto free_clk; | ||
352 | |||
353 | fb->fb.fix.mmio_start = fb->dev->res.start; | 349 | fb->fb.fix.mmio_start = fb->dev->res.start; |
354 | fb->fb.fix.mmio_len = SZ_4K; | 350 | fb->fb.fix.mmio_len = SZ_4K; |
355 | 351 | ||
@@ -357,7 +353,7 @@ static int clcdfb_register(struct clcd_fb *fb) | |||
357 | if (!fb->regs) { | 353 | if (!fb->regs) { |
358 | printk(KERN_ERR "CLCD: unable to remap registers\n"); | 354 | printk(KERN_ERR "CLCD: unable to remap registers\n"); |
359 | ret = -ENOMEM; | 355 | ret = -ENOMEM; |
360 | goto unuse_clk; | 356 | goto free_clk; |
361 | } | 357 | } |
362 | 358 | ||
363 | fb->fb.fbops = &clcdfb_ops; | 359 | fb->fb.fbops = &clcdfb_ops; |
@@ -427,8 +423,6 @@ static int clcdfb_register(struct clcd_fb *fb) | |||
427 | printk(KERN_ERR "CLCD: cannot register framebuffer (%d)\n", ret); | 423 | printk(KERN_ERR "CLCD: cannot register framebuffer (%d)\n", ret); |
428 | 424 | ||
429 | iounmap(fb->regs); | 425 | iounmap(fb->regs); |
430 | unuse_clk: | ||
431 | clk_unuse(fb->clk); | ||
432 | free_clk: | 426 | free_clk: |
433 | clk_put(fb->clk); | 427 | clk_put(fb->clk); |
434 | out: | 428 | out: |
@@ -489,7 +483,6 @@ static int clcdfb_remove(struct amba_device *dev) | |||
489 | clcdfb_disable(fb); | 483 | clcdfb_disable(fb); |
490 | unregister_framebuffer(&fb->fb); | 484 | unregister_framebuffer(&fb->fb); |
491 | iounmap(fb->regs); | 485 | iounmap(fb->regs); |
492 | clk_unuse(fb->clk); | ||
493 | clk_put(fb->clk); | 486 | clk_put(fb->clk); |
494 | 487 | ||
495 | fb->board->remove(fb); | 488 | fb->board->remove(fb); |
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index ce6e749db3a7..d9c08cc7ac44 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -746,7 +746,6 @@ int __init s3c2410fb_probe(struct platform_device *pdev) | |||
746 | goto release_irq; | 746 | goto release_irq; |
747 | } | 747 | } |
748 | 748 | ||
749 | clk_use(info->clk); | ||
750 | clk_enable(info->clk); | 749 | clk_enable(info->clk); |
751 | dprintk("got and enabled clock\n"); | 750 | dprintk("got and enabled clock\n"); |
752 | 751 | ||
@@ -783,7 +782,6 @@ free_video_memory: | |||
783 | s3c2410fb_unmap_video_memory(info); | 782 | s3c2410fb_unmap_video_memory(info); |
784 | release_clock: | 783 | release_clock: |
785 | clk_disable(info->clk); | 784 | clk_disable(info->clk); |
786 | clk_unuse(info->clk); | ||
787 | clk_put(info->clk); | 785 | clk_put(info->clk); |
788 | release_irq: | 786 | release_irq: |
789 | free_irq(irq,info); | 787 | free_irq(irq,info); |
@@ -828,7 +826,6 @@ static int s3c2410fb_remove(struct platform_device *pdev) | |||
828 | 826 | ||
829 | if (info->clk) { | 827 | if (info->clk) { |
830 | clk_disable(info->clk); | 828 | clk_disable(info->clk); |
831 | clk_unuse(info->clk); | ||
832 | clk_put(info->clk); | 829 | clk_put(info->clk); |
833 | info->clk = NULL; | 830 | info->clk = NULL; |
834 | } | 831 | } |
diff --git a/include/asm-arm/hardware/clock.h b/include/asm-arm/hardware/clock.h index 5c5689409a4b..69f33215e437 100644 --- a/include/asm-arm/hardware/clock.h +++ b/include/asm-arm/hardware/clock.h | |||
@@ -63,20 +63,6 @@ int clk_enable(struct clk *clk); | |||
63 | void clk_disable(struct clk *clk); | 63 | void clk_disable(struct clk *clk); |
64 | 64 | ||
65 | /** | 65 | /** |
66 | * clk_use - increment the use count | ||
67 | * @clk: clock source | ||
68 | * | ||
69 | * Returns success (0) or negative errno. | ||
70 | */ | ||
71 | int clk_use(struct clk *clk); | ||
72 | |||
73 | /** | ||
74 | * clk_unuse - decrement the use count | ||
75 | * @clk: clock source | ||
76 | */ | ||
77 | void clk_unuse(struct clk *clk); | ||
78 | |||
79 | /** | ||
80 | * clk_get_rate - obtain the current clock rate (in Hz) for a clock source. | 66 | * clk_get_rate - obtain the current clock rate (in Hz) for a clock source. |
81 | * This is only valid once the clock source has been enabled. | 67 | * This is only valid once the clock source has been enabled. |
82 | * @clk: clock source | 68 | * @clk: clock source |