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.
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)
{
static struct file_operations acq_fops = {
.owner = THIS_MODULE,
- .read = acq_read,
.write = acq_write,
.ioctl = acq_ioctl,
.open = acq_open,
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... */
static struct file_operations wdt_fops = {
.owner= THIS_MODULE,
.llseek= no_llseek,
- .read= fop_read,
.write= fop_write,
.open= fop_open,
.release= fop_close,
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)
static struct file_operations ibwdt_fops = {
.owner = THIS_MODULE,
- .read = ibwdt_read,
.write = ibwdt_write,
.ioctl = ibwdt_ioctl,
.open = ibwdt_open,
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)
{
static struct file_operations zf_fops = {
.owner = THIS_MODULE,
- .read = zf_read,
.write = zf_write,
.ioctl = zf_ioctl,
.open = zf_open,
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))
static struct file_operations wdt_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
- .read = fop_read,
.write = fop_write,
.open = fop_open,
.release = fop_close,
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))
static struct file_operations wdt_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
- .read = fop_read,
.write = fop_write,
.open = fop_open,
.release = fop_close,