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

Staging: Remove unnecessary casts of private_data

Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 f69b0d64
...@@ -104,7 +104,7 @@ static int log_release(struct inode *inode, struct file *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, static ssize_t log_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos) 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; struct debug_log *debug_log = bat_priv->debug_log;
int error, i = 0; int error, i = 0;
char c; char c;
...@@ -158,7 +158,7 @@ static ssize_t log_read(struct file *file, char __user *buf, ...@@ -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) 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; struct debug_log *debug_log = bat_priv->debug_log;
poll_wait(file, &debug_log->queue_wait, wait); poll_wait(file, &debug_log->queue_wait, wait);
......
...@@ -78,8 +78,7 @@ static int bat_socket_open(struct inode *inode, struct file *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) static int bat_socket_release(struct inode *inode, struct file *file)
{ {
struct socket_client *socket_client = struct socket_client *socket_client = file->private_data;
(struct socket_client *)file->private_data;
struct socket_packet *socket_packet; struct socket_packet *socket_packet;
struct list_head *list_pos, *list_pos_tmp; struct list_head *list_pos, *list_pos_tmp;
unsigned long flags; unsigned long flags;
...@@ -107,8 +106,7 @@ static int bat_socket_release(struct inode *inode, struct file *file) ...@@ -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, static ssize_t bat_socket_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct socket_client *socket_client = struct socket_client *socket_client = file->private_data;
(struct socket_client *)file->private_data;
struct socket_packet *socket_packet; struct socket_packet *socket_packet;
size_t packet_len; size_t packet_len;
int error; int error;
...@@ -155,8 +153,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff, ...@@ -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 */ /* FIXME: each orig_node->batman_if will be attached to a softif */
struct bat_priv *bat_priv = netdev_priv(soft_device); struct bat_priv *bat_priv = netdev_priv(soft_device);
struct socket_client *socket_client = struct socket_client *socket_client = file->private_data;
(struct socket_client *)file->private_data;
struct icmp_packet_rr icmp_packet; struct icmp_packet_rr icmp_packet;
struct orig_node *orig_node; struct orig_node *orig_node;
struct batman_if *batman_if; struct batman_if *batman_if;
...@@ -247,8 +244,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff, ...@@ -247,8 +244,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff,
static unsigned int bat_socket_poll(struct file *file, poll_table *wait) static unsigned int bat_socket_poll(struct file *file, poll_table *wait)
{ {
struct socket_client *socket_client = struct socket_client *socket_client = file->private_data;
(struct socket_client *)file->private_data;
poll_wait(file, &socket_client->queue_wait, wait); poll_wait(file, &socket_client->queue_wait, wait);
......
...@@ -699,7 +699,7 @@ static int cx25821_audio_initdev(struct cx25821_dev *dev) ...@@ -699,7 +699,7 @@ static int cx25821_audio_initdev(struct cx25821_dev *dev)
/* Card "creation" */ /* Card "creation" */
card->private_free = snd_cx25821_dev_free; 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); spin_lock_init(&chip->reg_lock);
chip->dev = dev; chip->dev = dev;
......
...@@ -791,7 +791,7 @@ static struct easycap *peasycap; ...@@ -791,7 +791,7 @@ static struct easycap *peasycap;
static struct usb_device *p; static struct usb_device *p;
static __u32 isequence; static __u32 isequence;
peasycap = (struct easycap *)file->private_data; peasycap = file->private_data;
if (NULL == peasycap) { if (NULL == peasycap) {
SAY("ERROR: peasycap is NULL\n"); SAY("ERROR: peasycap is NULL\n");
return -1; return -1;
...@@ -1973,7 +1973,7 @@ int easysnd_ioctl(struct inode *inode, struct file *file, \ ...@@ -1973,7 +1973,7 @@ int easysnd_ioctl(struct inode *inode, struct file *file, \
struct easycap *peasycap; struct easycap *peasycap;
struct usb_device *p; struct usb_device *p;
peasycap = (struct easycap *)file->private_data; peasycap = file->private_data;
if (NULL == peasycap) { if (NULL == peasycap) {
SAY("ERROR: peasycap is NULL.\n"); SAY("ERROR: peasycap is NULL.\n");
return -1; return -1;
......
...@@ -527,7 +527,7 @@ struct easycap *peasycap; ...@@ -527,7 +527,7 @@ struct easycap *peasycap;
JOT(4, "\n"); JOT(4, "\n");
peasycap = (struct easycap *)file->private_data; peasycap = file->private_data;
if (NULL == peasycap) { if (NULL == peasycap) {
SAY("ERROR: peasycap is NULL.\n"); SAY("ERROR: peasycap is NULL.\n");
SAY("ending unsuccessfully\n"); SAY("ending unsuccessfully\n");
...@@ -819,7 +819,7 @@ if (NULL == ((struct file *)file)) { ...@@ -819,7 +819,7 @@ if (NULL == ((struct file *)file)) {
SAY("ERROR: file pointer is NULL\n"); SAY("ERROR: file pointer is NULL\n");
return -EFAULT; return -EFAULT;
} }
peasycap = (struct easycap *)file->private_data; peasycap = file->private_data;
if (NULL == peasycap) { if (NULL == peasycap) {
SAY("ERROR: peasycap is NULL\n"); SAY("ERROR: peasycap is NULL\n");
return -EFAULT; return -EFAULT;
......
...@@ -630,7 +630,7 @@ struct easycap *peasycap; ...@@ -630,7 +630,7 @@ struct easycap *peasycap;
JOT(4, "begins\n"); JOT(4, "begins\n");
peasycap = (struct easycap *)file->private_data; peasycap = file->private_data;
if (NULL == peasycap) { if (NULL == peasycap) {
SAY("ERROR: peasycap is NULL.\n"); SAY("ERROR: peasycap is NULL.\n");
return -EFAULT; return -EFAULT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册