]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-sa1100/neponset.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
[linux-2.6-omap-h63xx.git] / arch / arm / mach-sa1100 / neponset.c
index 075d4d1d63beb850d9e4a90cf0e72a213c38e480..9f1ed15093016b3ebd88a204795efca7d026946b 100644 (file)
@@ -4,7 +4,6 @@
  */
 #include <linux/kernel.h>
 #include <linux/init.h>
-#include <linux/ptrace.h>
 #include <linux/tty.h>
 #include <linux/ioport.h>
 #include <linux/serial_core.h>
@@ -140,12 +139,12 @@ static u_int neponset_get_mctrl(struct uart_port *port)
        return ret;
 }
 
-static struct sa1100_port_fns neponset_port_fns __initdata = {
+static struct sa1100_port_fns neponset_port_fns __devinitdata = {
        .set_mctrl      = neponset_set_mctrl,
        .get_mctrl      = neponset_get_mctrl,
 };
 
-static int neponset_probe(struct platform_device *dev)
+static int __devinit neponset_probe(struct platform_device *dev)
 {
        sa1100_register_uart_fns(&neponset_port_fns);
 
@@ -186,28 +185,21 @@ static int neponset_probe(struct platform_device *dev)
 /*
  * LDM power management.
  */
+static unsigned int neponset_saved_state;
+
 static int neponset_suspend(struct platform_device *dev, pm_message_t state)
 {
        /*
         * Save state.
         */
-       if (!dev->dev.power.saved_state)
-               dev->dev.power.saved_state = kmalloc(sizeof(unsigned int), GFP_KERNEL);
-       if (!dev->dev.power.saved_state)
-               return -ENOMEM;
-
-       *(unsigned int *)dev->dev.power.saved_state = NCR_0;
+       neponset_saved_state = NCR_0;
 
        return 0;
 }
 
 static int neponset_resume(struct platform_device *dev)
 {
-       if (dev->dev.power.saved_state) {
-               NCR_0 = *(unsigned int *)dev->dev.power.saved_state;
-               kfree(dev->dev.power.saved_state);
-               dev->dev.power.saved_state = NULL;
-       }
+       NCR_0 = neponset_saved_state;
 
        return 0;
 }
@@ -300,6 +292,8 @@ static struct platform_device *devices[] __initdata = {
        &smc91x_device,
 };
 
+extern void sa1110_mb_disable(void);
+
 static int __init neponset_init(void)
 {
        platform_driver_register(&neponset_device_driver);