Merge branch 'master' of /home/sam/kernel/linux-2.6/
[pandora-kernel.git] / arch / arm / plat-omap / ocpi.c
index b861482..b5d3070 100644 (file)
@@ -23,7 +23,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/errno.h>
@@ -31,9 +30,9 @@
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/err.h>
+#include <linux/clk.h>
 
 #include <asm/io.h>
-#include <asm/hardware/clock.h>
 #include <asm/hardware.h>
 
 #define OCPI_BASE              0xfffec320
@@ -62,9 +61,6 @@ int ocpi_enable(void)
        if (!cpu_is_omap16xx())
                return -ENODEV;
 
-       /* Make sure there's clock for OCPI */
-       clk_enable(ocpi_ck);
-
        /* Enable access for OHCI in OCPI */
        val = omap_readl(OCPI_PROT);
        val &= ~0xff;
@@ -88,7 +84,7 @@ static int __init omap_ocpi_init(void)
        if (IS_ERR(ocpi_ck))
                return PTR_ERR(ocpi_ck);
 
-       clk_use(ocpi_ck);
+       clk_enable(ocpi_ck);
        ocpi_enable();
        printk("OMAP OCPI interconnect driver loaded\n");
 
@@ -102,7 +98,7 @@ static void __exit omap_ocpi_exit(void)
        if (!cpu_is_omap16xx())
                return;
 
-       clk_unuse(ocpi_ck);
+       clk_disable(ocpi_ck);
        clk_put(ocpi_ck);
 }