mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 01:21:58 +00:00
USB: gadget: Remove unnecessary casts of private_data
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
5bd6e8b3fb
commit
fd63b10ba3
1 changed files with 3 additions and 3 deletions
|
@ -142,7 +142,7 @@ static struct usb_descriptor_header *hidg_fs_descriptors[] = {
|
||||||
static ssize_t f_hidg_read(struct file *file, char __user *buffer,
|
static ssize_t f_hidg_read(struct file *file, char __user *buffer,
|
||||||
size_t count, loff_t *ptr)
|
size_t count, loff_t *ptr)
|
||||||
{
|
{
|
||||||
struct f_hidg *hidg = (struct f_hidg *)file->private_data;
|
struct f_hidg *hidg = file->private_data;
|
||||||
char *tmp_buff = NULL;
|
char *tmp_buff = NULL;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ static void f_hidg_req_complete(struct usb_ep *ep, struct usb_request *req)
|
||||||
static ssize_t f_hidg_write(struct file *file, const char __user *buffer,
|
static ssize_t f_hidg_write(struct file *file, const char __user *buffer,
|
||||||
size_t count, loff_t *offp)
|
size_t count, loff_t *offp)
|
||||||
{
|
{
|
||||||
struct f_hidg *hidg = (struct f_hidg *)file->private_data;
|
struct f_hidg *hidg = file->private_data;
|
||||||
ssize_t status = -ENOMEM;
|
ssize_t status = -ENOMEM;
|
||||||
|
|
||||||
if (!access_ok(VERIFY_READ, buffer, count))
|
if (!access_ok(VERIFY_READ, buffer, count))
|
||||||
|
@ -257,7 +257,7 @@ static ssize_t f_hidg_write(struct file *file, const char __user *buffer,
|
||||||
|
|
||||||
static unsigned int f_hidg_poll(struct file *file, poll_table *wait)
|
static unsigned int f_hidg_poll(struct file *file, poll_table *wait)
|
||||||
{
|
{
|
||||||
struct f_hidg *hidg = (struct f_hidg *)file->private_data;
|
struct f_hidg *hidg = file->private_data;
|
||||||
unsigned int ret = 0;
|
unsigned int ret = 0;
|
||||||
|
|
||||||
poll_wait(file, &hidg->read_queue, wait);
|
poll_wait(file, &hidg->read_queue, wait);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue