]> git.hungrycats.org Git - linux/commitdiff
[PATCH] remove unnecessary stubs from watchdog drivers
authorRob Radez <rob@osinvestor.com>
Fri, 8 Aug 2003 03:26:27 +0000 (20:26 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Fri, 8 Aug 2003 03:26:27 +0000 (20:26 -0700)
This removes some function stubs from 6 watchdog drivers.

The VFS already returns -EINVAL in cases where fop->read == NULL, so
there's no need to duplicate the code 6 times.  This patch removes the
stubs and is compile tested.

drivers/char/watchdog/acquirewdt.c
drivers/char/watchdog/alim7101_wdt.c
drivers/char/watchdog/ib700wdt.c
drivers/char/watchdog/machzwd.c
drivers/char/watchdog/sbc60xxwdt.c
drivers/char/watchdog/w83877f_wdt.c

index 687bdf6449112098ed2998b21c42f4b27defa053..2e6e98ac932dc5158870f4883e6423c28d341a81 100644 (file)
@@ -96,13 +96,6 @@ static ssize_t acq_write(struct file *file, const char *buf, size_t count, loff_
        return 0;
 }
 
-static ssize_t acq_read(struct file *file, char *buf, size_t count, loff_t *ppos)
-{
-       return -EINVAL;
-}
-
-
-
 static int acq_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
        unsigned long arg)
 {
@@ -193,7 +186,6 @@ static int acq_notify_sys(struct notifier_block *this, unsigned long code,
  
 static struct file_operations acq_fops = {
        .owner          = THIS_MODULE,
-       .read           = acq_read,
        .write          = acq_write,
        .ioctl          = acq_ioctl,
        .open           = acq_open,
index b467eee3e86824720803fe778e8e6056d8d506a9..e98826092f8c4e94c394cffbe7561ce36212cc02 100644 (file)
@@ -183,12 +183,6 @@ static ssize_t fop_write(struct file * file, const char * buf, size_t count, lof
        return 0;
 }
 
-static ssize_t fop_read(struct file * file, char * buf, size_t count, loff_t * ppos)
-{
-       /* No can do */
-       return -EINVAL;
-}
-
 static int fop_open(struct inode * inode, struct file * file)
 {
        /* Just in case we're already talking to someone... */
@@ -234,7 +228,6 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
 static struct file_operations wdt_fops = {
        .owner=         THIS_MODULE,
        .llseek=        no_llseek,
-       .read=          fop_read,
        .write=         fop_write,
        .open=          fop_open,
        .release=       fop_close,
index 45c1d50118b963e61a5a155b24104a6fed60f653..3cb496f8efb34b22cccb14d4abe6fcf5f0a25089 100644 (file)
@@ -166,12 +166,6 @@ ibwdt_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
        return 0;
 }
 
-static ssize_t
-ibwdt_read(struct file *file, char *buf, size_t count, loff_t *ppos)
-{
-       return -EINVAL;
-}
-
 static int
 ibwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
          unsigned long arg)
@@ -280,7 +274,6 @@ ibwdt_notify_sys(struct notifier_block *this, unsigned long code,
 
 static struct file_operations ibwdt_fops = {
        .owner          = THIS_MODULE,
-       .read           = ibwdt_read,
        .write          = ibwdt_write,
        .ioctl          = ibwdt_ioctl,
        .open           = ibwdt_open,
index 197806e1f2b8795a9d3229bb8e5c52f2467be252..87bfb0edb03a8bdac7e7d831aef46f89b55ac228 100644 (file)
@@ -349,14 +349,6 @@ static ssize_t zf_write(struct file *file, const char *buf, size_t count,
        return 0;
 }
 
-static ssize_t zf_read(struct file *file, char *buf, size_t count, 
-                                                       loff_t *ppos)
-{
-       return -EINVAL;
-}
-
-
-
 static int zf_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
        unsigned long arg)
 {
@@ -448,7 +440,6 @@ static int zf_notify_sys(struct notifier_block *this, unsigned long code,
 
 static struct file_operations zf_fops = {
        .owner          = THIS_MODULE,
-       .read           = zf_read,
        .write          = zf_write,
        .ioctl          = zf_ioctl,
        .open           = zf_open,
index 7230b8ce32524c8b1912885d3aafa5d03b3a915d..ace423c67845145e9daa68bfdedd523516162c7c 100644 (file)
@@ -194,12 +194,6 @@ static ssize_t fop_write(struct file * file, const char * buf, size_t count, lof
        return 0;
 }
 
-static ssize_t fop_read(struct file * file, char * buf, size_t count, loff_t * ppos)
-{
-       /* No can do */
-       return -EINVAL;
-}
-
 static int fop_open(struct inode * inode, struct file * file)
 {
        switch(minor(inode->i_rdev)) 
@@ -260,7 +254,6 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 static struct file_operations wdt_fops = {
        .owner          = THIS_MODULE,
        .llseek         = no_llseek,
-       .read           = fop_read,
        .write          = fop_write,
        .open           = fop_open,
        .release        = fop_close,
index 893382f5aa58d193187fb01ef36a7250eb0da017..ca81fb8c3271b7dff567edc4cc2d977b401dfefe 100644 (file)
@@ -202,12 +202,6 @@ static ssize_t fop_write(struct file * file, const char * buf, size_t count, lof
        return 0;
 }
 
-static ssize_t fop_read(struct file * file, char * buf, size_t count, loff_t * ppos)
-{
-       /* No can do */
-       return -EINVAL;
-}
-
 static int fop_open(struct inode * inode, struct file * file)
 {
        switch(minor(inode->i_rdev)) 
@@ -268,7 +262,6 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 static struct file_operations wdt_fops = {
        .owner          = THIS_MODULE,
        .llseek         = no_llseek,
-       .read           = fop_read,
        .write          = fop_write,
        .open           = fop_open,
        .release        = fop_close,