Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5c4eb61b375ce16fc7af5055d8ab7bc19e788361
Commit:     5c4eb61b375ce16fc7af5055d8ab7bc19e788361
Parent:     ec9505a7ecadc0ab8f8e3c4c5fa900d57467e391
Author:     Wim Van Sebroeck <[EMAIL PROTECTED]>
AuthorDate: Sat Jul 21 13:42:18 2007 +0000
Committer:  Wim Van Sebroeck <[EMAIL PROTECTED]>
CommitDate: Mon Jul 23 17:26:49 2007 +0000

    [WATCHDOG] WDIOC_GETSTATUS and WDIOC_GETBOOTSTATUS clean-up
    
    Add mandatory WDIOC_GETSTATUS and WDIOC_GETBOOTSTATUS ioctl's for
    drivers that don't have them yet.
    
    Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]>
---
 drivers/char/watchdog/cpu5wdt.c     |    4 ++++
 drivers/char/watchdog/machzwd.c     |    1 +
 drivers/char/watchdog/mixcomwd.c    |    5 +++++
 drivers/char/watchdog/mpc83xx_wdt.c |    3 +++
 drivers/char/watchdog/mtx-1_wdt.c   |    1 +
 5 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/char/watchdog/cpu5wdt.c b/drivers/char/watchdog/cpu5wdt.c
index d0d45a8..20eb6c3 100644
--- a/drivers/char/watchdog/cpu5wdt.c
+++ b/drivers/char/watchdog/cpu5wdt.c
@@ -162,6 +162,10 @@ static int cpu5wdt_ioctl(struct inode *inode, struct file 
*file, unsigned int cm
                        if ( copy_to_user(argp, &value, sizeof(int)) )
                                return -EFAULT;
                        break;
+               case WDIOC_GETBOOTSTATUS:
+                       if ( copy_to_user(argp, &value, sizeof(int)) )
+                               retrun -EFAULT;
+                       break;
                case WDIOC_GETSUPPORT:
                        if ( copy_to_user(argp, &ident, sizeof(ident)) )
                                return -EFAULT;
diff --git a/drivers/char/watchdog/machzwd.c b/drivers/char/watchdog/machzwd.c
index a0d2716..6d35bb1 100644
--- a/drivers/char/watchdog/machzwd.c
+++ b/drivers/char/watchdog/machzwd.c
@@ -321,6 +321,7 @@ static int zf_ioctl(struct inode *inode, struct file *file, 
unsigned int cmd,
                break;
 
        case WDIOC_GETSTATUS:
+       case WDIOC_GETBOOTSTATUS:
                return put_user(0, p);
 
        case WDIOC_KEEPALIVE:
diff --git a/drivers/char/watchdog/mixcomwd.c b/drivers/char/watchdog/mixcomwd.c
index db2ccb8..1adf1d5 100644
--- a/drivers/char/watchdog/mixcomwd.c
+++ b/drivers/char/watchdog/mixcomwd.c
@@ -215,6 +215,11 @@ static int mixcomwd_ioctl(struct inode *inode, struct file 
*file,
                                return -EFAULT;
                        }
                        break;
+               case WDIOC_GETBOOTSTATUS:
+                       if (copy_to_user(p, &status, sizeof(int))) {
+                               return -EFAULT;
+                       }
+                       break;
                case WDIOC_GETSUPPORT:
                        if (copy_to_user(argp, &ident, sizeof(ident))) {
                                return -EFAULT;
diff --git a/drivers/char/watchdog/mpc83xx_wdt.c 
b/drivers/char/watchdog/mpc83xx_wdt.c
index 18ca752..a0bf95f 100644
--- a/drivers/char/watchdog/mpc83xx_wdt.c
+++ b/drivers/char/watchdog/mpc83xx_wdt.c
@@ -119,6 +119,9 @@ static int mpc83xx_wdt_ioctl(struct inode *inode, struct 
file *file,
        switch (cmd) {
        case WDIOC_GETSUPPORT:
                return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0;
+       case WDIOC_GETSTATUS:
+       case WDIOC_GETBOOTSTATUS:
+               return put_user(0, p);
        case WDIOC_KEEPALIVE:
                mpc83xx_wdt_keepalive();
                return 0;
diff --git a/drivers/char/watchdog/mtx-1_wdt.c 
b/drivers/char/watchdog/mtx-1_wdt.c
index 419ab44..dcfd401 100644
--- a/drivers/char/watchdog/mtx-1_wdt.c
+++ b/drivers/char/watchdog/mtx-1_wdt.c
@@ -143,6 +143,7 @@ static int mtx1_wdt_ioctl(struct inode *inode, struct file 
*file, unsigned int c
                        mtx1_wdt_reset();
                        break;
                case WDIOC_GETSTATUS:
+               case WDIOC_GETBOOTSTATUS:
                        if ( copy_to_user(argp, &value, sizeof(int)) )
                                return -EFAULT;
                        break;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to