Commit aeeadf91 authored by Rob Radez's avatar Rob Radez Committed by Linus Torvalds

[PATCH] remove unnecessary stubs from watchdog drivers

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.
parent d4794d6c
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment