Pull bugzilla-5452 into release branch
[pandora-kernel.git] / arch / arm / mach-omap1 / serial.c
index 6810cfb..9b4cd69 100644 (file)
 #include <linux/tty.h>
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
+#include <linux/clk.h>
 
 #include <asm/io.h>
 #include <asm/mach-types.h>
-#include <asm/hardware/clock.h>
 
 #include <asm/arch/board.h>
 #include <asm/arch/mux.h>
@@ -30,9 +30,9 @@
 #include <asm/arch/pm.h>
 #endif
 
-static struct clk * uart1_ck = NULL;
-static struct clk * uart2_ck = NULL;
-static struct clk * uart3_ck = NULL;
+static struct clk * uart1_ck;
+static struct clk * uart2_ck;
+static struct clk * uart3_ck;
 
 static inline unsigned int omap_serial_in(struct plat_serial8250_port *up,
                                          int offset)
@@ -146,7 +146,7 @@ void __init omap_serial_init(void)
                        if (IS_ERR(uart1_ck))
                                printk("Could not get uart1_ck\n");
                        else {
-                               clk_use(uart1_ck);
+                               clk_enable(uart1_ck);
                                if (cpu_is_omap1510())
                                        clk_set_rate(uart1_ck, 12000000);
                        }
@@ -166,7 +166,7 @@ void __init omap_serial_init(void)
                        if (IS_ERR(uart2_ck))
                                printk("Could not get uart2_ck\n");
                        else {
-                               clk_use(uart2_ck);
+                               clk_enable(uart2_ck);
                                if (cpu_is_omap1510())
                                        clk_set_rate(uart2_ck, 12000000);
                                else
@@ -188,7 +188,7 @@ void __init omap_serial_init(void)
                        if (IS_ERR(uart3_ck))
                                printk("Could not get uart3_ck\n");
                        else {
-                               clk_use(uart3_ck);
+                               clk_enable(uart3_ck);
                                if (cpu_is_omap1510())
                                        clk_set_rate(uart3_ck, 12000000);
                        }
@@ -252,9 +252,8 @@ static void __init omap_serial_set_port_wakeup(int gpio_nr)
                return;
        }
        omap_set_gpio_direction(gpio_nr, 1);
-       set_irq_type(OMAP_GPIO_IRQ(gpio_nr), IRQT_RISING);
        ret = request_irq(OMAP_GPIO_IRQ(gpio_nr), &omap_serial_wake_interrupt,
-                         0, "serial wakeup", NULL);
+                         SA_TRIGGER_RISING, "serial wakeup", NULL);
        if (ret) {
                omap_free_gpio(gpio_nr);
                printk(KERN_ERR "No interrupt for UART wake GPIO: %i\n",