const: constify remaining dev_pm_ops
[safe/jmp/linux-2.6] / drivers / watchdog / mtx-1_wdt.c
index f820b82..08e8a6a 100644 (file)
@@ -5,7 +5,7 @@
  *                                                     All Rights Reserved.
  *                              http://www.4g-systems.biz
  *
- *     (C) Copyright 2007 OpenWrt.org, Florian Fainelli <florian@openwrt.org>
+ *     (C) Copyright 2007 OpenWrt.org, Florian Fainelli <florian@openwrt.org>
  *
  *      This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
@@ -98,6 +98,8 @@ static void mtx1_wdt_reset(void)
 
 static void mtx1_wdt_start(void)
 {
+       unsigned long flags;
+
        spin_lock_irqsave(&mtx1_wdt_device.lock, flags);
        if (!mtx1_wdt_device.queue) {
                mtx1_wdt_device.queue = 1;
@@ -110,6 +112,8 @@ static void mtx1_wdt_start(void)
 
 static int mtx1_wdt_stop(void)
 {
+       unsigned long flags;
+
        spin_lock_irqsave(&mtx1_wdt_device.lock, flags);
        if (mtx1_wdt_device.queue) {
                mtx1_wdt_device.queue = 0;
@@ -191,18 +195,18 @@ static const struct file_operations mtx1_wdt_fops = {
        .unlocked_ioctl = mtx1_wdt_ioctl,
        .open           = mtx1_wdt_open,
        .write          = mtx1_wdt_write,
-       .release        = mtx1_wdt_release
+       .release        = mtx1_wdt_release,
 };
 
 
 static struct miscdevice mtx1_wdt_misc = {
        .minor  = WATCHDOG_MINOR,
        .name   = "watchdog",
-       .fops   = &mtx1_wdt_fops
+       .fops   = &mtx1_wdt_fops,
 };
 
 
-static int mtx1_wdt_probe(struct platform_device *pdev)
+static int __devinit mtx1_wdt_probe(struct platform_device *pdev)
 {
        int ret;
 
@@ -225,7 +229,7 @@ static int mtx1_wdt_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int mtx1_wdt_remove(struct platform_device *pdev)
+static int __devexit mtx1_wdt_remove(struct platform_device *pdev)
 {
        /* FIXME: do we need to lock this test ? */
        if (mtx1_wdt_device.queue) {
@@ -238,7 +242,7 @@ static int mtx1_wdt_remove(struct platform_device *pdev)
 
 static struct platform_driver mtx1_wdt = {
        .probe = mtx1_wdt_probe,
-       .remove = mtx1_wdt_remove,
+       .remove = __devexit_p(mtx1_wdt_remove),
        .driver.name = "mtx1-wdt",
        .driver.owner = THIS_MODULE,
 };