]> err.no Git - linux-2.6/blobdiff - drivers/watchdog/at32ap700x_wdt.c
[WATCHDOG] Merge code clean-up's from Alan Cox.
[linux-2.6] / drivers / watchdog / at32ap700x_wdt.c
index fb5ed6478f78e66b5b86ad42ee08c6e20864585b..c5dc5e912fb255f8736ceb30e73ddb34283aa695 100644 (file)
@@ -212,8 +212,8 @@ static struct watchdog_info at32_wdt_info = {
 /*
  * Handle commands from user-space.
  */
-static int at32_wdt_ioctl(struct inode *inode, struct file *file,
-               unsigned int cmd, unsigned long arg)
+static long at32_wdt_ioctl(struct file *file,
+                               unsigned int cmd, unsigned long arg)
 {
        int ret = -ENOTTY;
        int time;
@@ -298,7 +298,7 @@ static ssize_t at32_wdt_write(struct file *file, const char __user *data,
 static const struct file_operations at32_wdt_fops = {
        .owner          = THIS_MODULE,
        .llseek         = no_llseek,
-       .ioctl          = at32_wdt_ioctl,
+       .unlocked_ioctl = at32_wdt_ioctl,
        .open           = at32_wdt_open,
        .release        = at32_wdt_close,
        .write          = at32_wdt_write,
@@ -391,7 +391,6 @@ static int __exit at32_wdt_remove(struct platform_device *pdev)
                wdt = NULL;
                platform_set_drvdata(pdev, NULL);
        }
-
        return 0;
 }
 
@@ -418,6 +417,9 @@ static int at32_wdt_resume(struct platform_device *pdev)
 #define at32_wdt_resume NULL
 #endif
 
+/* work with hotplug and coldplug */
+MODULE_ALIAS("platform:at32_wdt");
+
 static struct platform_driver at32_wdt_driver = {
        .remove         = __exit_p(at32_wdt_remove),
        .suspend        = at32_wdt_suspend,