]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Staging: Remove unnecessary casts of private_data
authorJoe Perches <joe@perches.com>
Mon, 12 Jul 2010 20:50:10 +0000 (13:50 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 22 Jul 2010 21:43:51 +0000 (14:43 -0700)
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/batman-adv/bat_debugfs.c
drivers/staging/batman-adv/icmp_socket.c
drivers/staging/cx25821/cx25821-alsa.c
drivers/staging/easycap/easycap_ioctl.c
drivers/staging/easycap/easycap_main.c
drivers/staging/easycap/easycap_sound.c

index 8e8eef0e588e7f0e6e8a6497ffcd5d9b44a795bc..507da68054c76ae63b1f56c46881c755259a1b66 100644 (file)
@@ -104,7 +104,7 @@ static int log_release(struct inode *inode, struct file *file)
 static ssize_t log_read(struct file *file, char __user *buf,
                        size_t count, loff_t *ppos)
 {
-       struct bat_priv *bat_priv = (struct bat_priv *)file->private_data;
+       struct bat_priv *bat_priv = file->private_data;
        struct debug_log *debug_log = bat_priv->debug_log;
        int error, i = 0;
        char c;
@@ -158,7 +158,7 @@ static ssize_t log_read(struct file *file, char __user *buf,
 
 static unsigned int log_poll(struct file *file, poll_table *wait)
 {
-       struct bat_priv *bat_priv = (struct bat_priv *)file->private_data;
+       struct bat_priv *bat_priv = file->private_data;
        struct debug_log *debug_log = bat_priv->debug_log;
 
        poll_wait(file, &debug_log->queue_wait, wait);
index 532f246de43d17ba3cdbc628ddd83585112bd73d..fc3d32c127292ab5dc717b59e169d6e19f52f10b 100644 (file)
@@ -78,8 +78,7 @@ static int bat_socket_open(struct inode *inode, struct file *file)
 
 static int bat_socket_release(struct inode *inode, struct file *file)
 {
-       struct socket_client *socket_client =
-               (struct socket_client *)file->private_data;
+       struct socket_client *socket_client = file->private_data;
        struct socket_packet *socket_packet;
        struct list_head *list_pos, *list_pos_tmp;
        unsigned long flags;
@@ -107,8 +106,7 @@ static int bat_socket_release(struct inode *inode, struct file *file)
 static ssize_t bat_socket_read(struct file *file, char __user *buf,
                               size_t count, loff_t *ppos)
 {
-       struct socket_client *socket_client =
-               (struct socket_client *)file->private_data;
+       struct socket_client *socket_client = file->private_data;
        struct socket_packet *socket_packet;
        size_t packet_len;
        int error;
@@ -155,8 +153,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff,
 {
        /* FIXME: each orig_node->batman_if will be attached to a softif */
        struct bat_priv *bat_priv = netdev_priv(soft_device);
-       struct socket_client *socket_client =
-               (struct socket_client *)file->private_data;
+       struct socket_client *socket_client = file->private_data;
        struct icmp_packet_rr icmp_packet;
        struct orig_node *orig_node;
        struct batman_if *batman_if;
@@ -247,8 +244,7 @@ out:
 
 static unsigned int bat_socket_poll(struct file *file, poll_table *wait)
 {
-       struct socket_client *socket_client =
-               (struct socket_client *)file->private_data;
+       struct socket_client *socket_client = file->private_data;
 
        poll_wait(file, &socket_client->queue_wait, wait);
 
index 1798975a69bdf814a33356781f6c759e8c4336e7..ce2c6f1323e1ee7b8186a006a08daf5b57ba1336 100644 (file)
@@ -699,7 +699,7 @@ static int cx25821_audio_initdev(struct cx25821_dev *dev)
 
        /* Card "creation" */
        card->private_free = snd_cx25821_dev_free;
-       chip = (struct cx25821_audio_dev *) card->private_data;
+       chip = card->private_data;
        spin_lock_init(&chip->reg_lock);
 
        chip->dev = dev;
index 7227d735f5e27e91e73d732533c15f6bf4c70b71..276b63dfe27ee7cb6fa60fbd03b75ecf694ce051 100644 (file)
@@ -791,7 +791,7 @@ static struct easycap *peasycap;
 static struct usb_device *p;
 static __u32 isequence;
 
-peasycap = (struct easycap *)file->private_data;
+peasycap = file->private_data;
 if (NULL == peasycap) {
        SAY("ERROR:  peasycap is NULL\n");
        return -1;
@@ -1973,7 +1973,7 @@ int easysnd_ioctl(struct inode *inode, struct file *file, \
 struct easycap *peasycap;
 struct usb_device *p;
 
-peasycap = (struct easycap *)file->private_data;
+peasycap = file->private_data;
 if (NULL == peasycap) {
        SAY("ERROR:  peasycap is NULL.\n");
        return -1;
index f7a65afb6cd8889cd040eb9172add2ac3f855689..09c194ce10a398b785fa03736e92f4aaaee8dadb 100644 (file)
@@ -527,7 +527,7 @@ struct easycap *peasycap;
 
 JOT(4, "\n");
 
-peasycap = (struct easycap *)file->private_data;
+peasycap = file->private_data;
 if (NULL == peasycap) {
        SAY("ERROR:  peasycap is NULL.\n");
        SAY("ending unsuccessfully\n");
@@ -819,7 +819,7 @@ if (NULL == ((struct file *)file)) {
        SAY("ERROR:  file pointer is NULL\n");
        return -EFAULT;
 }
-peasycap = (struct easycap *)file->private_data;
+peasycap = file->private_data;
 if (NULL == peasycap) {
        SAY("ERROR:  peasycap is NULL\n");
        return -EFAULT;
index 37eaf426533c6730d29eee71988dc98a3d336127..63562bda738eebc48cd29dac68fdc7751f117b9d 100644 (file)
@@ -630,7 +630,7 @@ struct easycap *peasycap;
 
 JOT(4, "begins\n");
 
-peasycap = (struct easycap *)file->private_data;
+peasycap = file->private_data;
 if (NULL == peasycap) {
        SAY("ERROR:  peasycap is NULL.\n");
        return -EFAULT;