Skip to content

Commit

Permalink
staging:ced1401: remove read write callbacks from fops
Browse files Browse the repository at this point in the history
As the driver says that read and writes should not be performed
and instead the user to kernel transactions are performed through
ioctl interface, remove these functions as they are not required

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Devendra Naga authored and Greg Kroah-Hartman committed Sep 21, 2012
1 parent 2341111 commit bae95b0
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions drivers/staging/ced1401/usb1401.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,24 +261,6 @@ static int ced_flush(struct file *file, fl_owner_t id)
return res;
}

static ssize_t ced_read(struct file *file, char *buffer, size_t count,
loff_t * ppos)
{
DEVICE_EXTENSION *pdx = file->private_data;
dev_err(&pdx->interface->dev, "%s called: use ioctl for cedusb",
__func__);
return 0; // as we do not do reads this way
}

static ssize_t ced_write(struct file *file, const char *user_buffer,
size_t count, loff_t * ppos)
{
DEVICE_EXTENSION *pdx = file->private_data;
dev_err(&pdx->interface->dev, "%s called: use ioctl for cedusb",
__func__);
return 0;
}

/***************************************************************************
** CanAcceptIoRequests
** If the device is removed, interface is set NULL. We also clear our pointer
Expand Down Expand Up @@ -1402,8 +1384,6 @@ static int ced_ioctl(struct inode *node, struct file *file, unsigned int cmd,

static const struct file_operations ced_fops = {
.owner = THIS_MODULE,
.read = ced_read,
.write = ced_write,
.open = ced_open,
.release = ced_release,
.flush = ced_flush,
Expand Down

0 comments on commit bae95b0

Please sign in to comment.