提交 e53e841d 编写于 作者: J Joe Perches 提交者: Greg Kroah-Hartman

USB: usb-skeleton: Remove unnecessary casts of private_data

Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 925ce689
...@@ -142,7 +142,7 @@ static int skel_release(struct inode *inode, struct file *file) ...@@ -142,7 +142,7 @@ static int skel_release(struct inode *inode, struct file *file)
{ {
struct usb_skel *dev; struct usb_skel *dev;
dev = (struct usb_skel *)file->private_data; dev = file->private_data;
if (dev == NULL) if (dev == NULL)
return -ENODEV; return -ENODEV;
...@@ -162,7 +162,7 @@ static int skel_flush(struct file *file, fl_owner_t id) ...@@ -162,7 +162,7 @@ static int skel_flush(struct file *file, fl_owner_t id)
struct usb_skel *dev; struct usb_skel *dev;
int res; int res;
dev = (struct usb_skel *)file->private_data; dev = file->private_data;
if (dev == NULL) if (dev == NULL)
return -ENODEV; return -ENODEV;
...@@ -246,7 +246,7 @@ static ssize_t skel_read(struct file *file, char *buffer, size_t count, ...@@ -246,7 +246,7 @@ static ssize_t skel_read(struct file *file, char *buffer, size_t count,
int rv; int rv;
bool ongoing_io; bool ongoing_io;
dev = (struct usb_skel *)file->private_data; dev = file->private_data;
/* if we cannot read at all, return EOF */ /* if we cannot read at all, return EOF */
if (!dev->bulk_in_urb || !count) if (!dev->bulk_in_urb || !count)
...@@ -401,7 +401,7 @@ static ssize_t skel_write(struct file *file, const char *user_buffer, ...@@ -401,7 +401,7 @@ static ssize_t skel_write(struct file *file, const char *user_buffer,
char *buf = NULL; char *buf = NULL;
size_t writesize = min(count, (size_t)MAX_TRANSFER); size_t writesize = min(count, (size_t)MAX_TRANSFER);
dev = (struct usb_skel *)file->private_data; dev = file->private_data;
/* verify that we actually have some data to write */ /* verify that we actually have some data to write */
if (count == 0) if (count == 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部