diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/airo.c | 22 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/debugfs.c | 4 |
4 files changed, 21 insertions, 24 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index a441aad922c2..528d56375623 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -4657,7 +4657,7 @@ static ssize_t proc_write( struct file *file, | |||
4657 | loff_t *offset ) | 4657 | loff_t *offset ) |
4658 | { | 4658 | { |
4659 | loff_t pos = *offset; | 4659 | loff_t pos = *offset; |
4660 | struct proc_data *priv = (struct proc_data*)file->private_data; | 4660 | struct proc_data *priv = file->private_data; |
4661 | 4661 | ||
4662 | if (!priv->wbuffer) | 4662 | if (!priv->wbuffer) |
4663 | return -EINVAL; | 4663 | return -EINVAL; |
@@ -4689,7 +4689,7 @@ static int proc_status_open(struct inode *inode, struct file *file) | |||
4689 | 4689 | ||
4690 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) | 4690 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) |
4691 | return -ENOMEM; | 4691 | return -ENOMEM; |
4692 | data = (struct proc_data *)file->private_data; | 4692 | data = file->private_data; |
4693 | if ((data->rbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) { | 4693 | if ((data->rbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) { |
4694 | kfree (file->private_data); | 4694 | kfree (file->private_data); |
4695 | return -ENOMEM; | 4695 | return -ENOMEM; |
@@ -4772,7 +4772,7 @@ static int proc_stats_rid_open( struct inode *inode, | |||
4772 | 4772 | ||
4773 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) | 4773 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) |
4774 | return -ENOMEM; | 4774 | return -ENOMEM; |
4775 | data = (struct proc_data *)file->private_data; | 4775 | data = file->private_data; |
4776 | if ((data->rbuffer = kmalloc( 4096, GFP_KERNEL )) == NULL) { | 4776 | if ((data->rbuffer = kmalloc( 4096, GFP_KERNEL )) == NULL) { |
4777 | kfree (file->private_data); | 4777 | kfree (file->private_data); |
4778 | return -ENOMEM; | 4778 | return -ENOMEM; |
@@ -5045,7 +5045,7 @@ static int proc_config_open(struct inode *inode, struct file *file) | |||
5045 | 5045 | ||
5046 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) | 5046 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) |
5047 | return -ENOMEM; | 5047 | return -ENOMEM; |
5048 | data = (struct proc_data *)file->private_data; | 5048 | data = file->private_data; |
5049 | if ((data->rbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) { | 5049 | if ((data->rbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) { |
5050 | kfree (file->private_data); | 5050 | kfree (file->private_data); |
5051 | return -ENOMEM; | 5051 | return -ENOMEM; |
@@ -5127,7 +5127,7 @@ static int proc_config_open(struct inode *inode, struct file *file) | |||
5127 | 5127 | ||
5128 | static void proc_SSID_on_close(struct inode *inode, struct file *file) | 5128 | static void proc_SSID_on_close(struct inode *inode, struct file *file) |
5129 | { | 5129 | { |
5130 | struct proc_data *data = (struct proc_data *)file->private_data; | 5130 | struct proc_data *data = file->private_data; |
5131 | struct proc_dir_entry *dp = PDE(inode); | 5131 | struct proc_dir_entry *dp = PDE(inode); |
5132 | struct net_device *dev = dp->data; | 5132 | struct net_device *dev = dp->data; |
5133 | struct airo_info *ai = dev->ml_priv; | 5133 | struct airo_info *ai = dev->ml_priv; |
@@ -5170,7 +5170,7 @@ static inline u8 hexVal(char c) { | |||
5170 | } | 5170 | } |
5171 | 5171 | ||
5172 | static void proc_APList_on_close( struct inode *inode, struct file *file ) { | 5172 | static void proc_APList_on_close( struct inode *inode, struct file *file ) { |
5173 | struct proc_data *data = (struct proc_data *)file->private_data; | 5173 | struct proc_data *data = file->private_data; |
5174 | struct proc_dir_entry *dp = PDE(inode); | 5174 | struct proc_dir_entry *dp = PDE(inode); |
5175 | struct net_device *dev = dp->data; | 5175 | struct net_device *dev = dp->data; |
5176 | struct airo_info *ai = dev->ml_priv; | 5176 | struct airo_info *ai = dev->ml_priv; |
@@ -5316,7 +5316,7 @@ static void proc_wepkey_on_close( struct inode *inode, struct file *file ) { | |||
5316 | 5316 | ||
5317 | memset(key, 0, sizeof(key)); | 5317 | memset(key, 0, sizeof(key)); |
5318 | 5318 | ||
5319 | data = (struct proc_data *)file->private_data; | 5319 | data = file->private_data; |
5320 | if ( !data->writelen ) return; | 5320 | if ( !data->writelen ) return; |
5321 | 5321 | ||
5322 | if (data->wbuffer[0] >= '0' && data->wbuffer[0] <= '3' && | 5322 | if (data->wbuffer[0] >= '0' && data->wbuffer[0] <= '3' && |
@@ -5370,7 +5370,7 @@ static int proc_wepkey_open( struct inode *inode, struct file *file ) | |||
5370 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) | 5370 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) |
5371 | return -ENOMEM; | 5371 | return -ENOMEM; |
5372 | memset(&wkr, 0, sizeof(wkr)); | 5372 | memset(&wkr, 0, sizeof(wkr)); |
5373 | data = (struct proc_data *)file->private_data; | 5373 | data = file->private_data; |
5374 | if ((data->rbuffer = kzalloc( 180, GFP_KERNEL )) == NULL) { | 5374 | if ((data->rbuffer = kzalloc( 180, GFP_KERNEL )) == NULL) { |
5375 | kfree (file->private_data); | 5375 | kfree (file->private_data); |
5376 | return -ENOMEM; | 5376 | return -ENOMEM; |
@@ -5416,7 +5416,7 @@ static int proc_SSID_open(struct inode *inode, struct file *file) | |||
5416 | 5416 | ||
5417 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) | 5417 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) |
5418 | return -ENOMEM; | 5418 | return -ENOMEM; |
5419 | data = (struct proc_data *)file->private_data; | 5419 | data = file->private_data; |
5420 | if ((data->rbuffer = kmalloc( 104, GFP_KERNEL )) == NULL) { | 5420 | if ((data->rbuffer = kmalloc( 104, GFP_KERNEL )) == NULL) { |
5421 | kfree (file->private_data); | 5421 | kfree (file->private_data); |
5422 | return -ENOMEM; | 5422 | return -ENOMEM; |
@@ -5460,7 +5460,7 @@ static int proc_APList_open( struct inode *inode, struct file *file ) { | |||
5460 | 5460 | ||
5461 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) | 5461 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) |
5462 | return -ENOMEM; | 5462 | return -ENOMEM; |
5463 | data = (struct proc_data *)file->private_data; | 5463 | data = file->private_data; |
5464 | if ((data->rbuffer = kmalloc( 104, GFP_KERNEL )) == NULL) { | 5464 | if ((data->rbuffer = kmalloc( 104, GFP_KERNEL )) == NULL) { |
5465 | kfree (file->private_data); | 5465 | kfree (file->private_data); |
5466 | return -ENOMEM; | 5466 | return -ENOMEM; |
@@ -5502,7 +5502,7 @@ static int proc_BSSList_open( struct inode *inode, struct file *file ) { | |||
5502 | 5502 | ||
5503 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) | 5503 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) |
5504 | return -ENOMEM; | 5504 | return -ENOMEM; |
5505 | data = (struct proc_data *)file->private_data; | 5505 | data = file->private_data; |
5506 | if ((data->rbuffer = kmalloc( 1024, GFP_KERNEL )) == NULL) { | 5506 | if ((data->rbuffer = kmalloc( 1024, GFP_KERNEL )) == NULL) { |
5507 | kfree (file->private_data); | 5507 | kfree (file->private_data); |
5508 | return -ENOMEM; | 5508 | return -ENOMEM; |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index e38ca66db849..47f76031447b 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -492,8 +492,7 @@ static int ath9k_debugfs_open(struct inode *inode, struct file *file) | |||
492 | static ssize_t read_file_tgt_stats(struct file *file, char __user *user_buf, | 492 | static ssize_t read_file_tgt_stats(struct file *file, char __user *user_buf, |
493 | size_t count, loff_t *ppos) | 493 | size_t count, loff_t *ppos) |
494 | { | 494 | { |
495 | struct ath9k_htc_priv *priv = | 495 | struct ath9k_htc_priv *priv = file->private_data; |
496 | (struct ath9k_htc_priv *) file->private_data; | ||
497 | struct ath9k_htc_target_stats cmd_rsp; | 496 | struct ath9k_htc_target_stats cmd_rsp; |
498 | char buf[512]; | 497 | char buf[512]; |
499 | unsigned int len = 0; | 498 | unsigned int len = 0; |
@@ -536,8 +535,7 @@ static const struct file_operations fops_tgt_stats = { | |||
536 | static ssize_t read_file_xmit(struct file *file, char __user *user_buf, | 535 | static ssize_t read_file_xmit(struct file *file, char __user *user_buf, |
537 | size_t count, loff_t *ppos) | 536 | size_t count, loff_t *ppos) |
538 | { | 537 | { |
539 | struct ath9k_htc_priv *priv = | 538 | struct ath9k_htc_priv *priv = file->private_data; |
540 | (struct ath9k_htc_priv *) file->private_data; | ||
541 | char buf[512]; | 539 | char buf[512]; |
542 | unsigned int len = 0; | 540 | unsigned int len = 0; |
543 | 541 | ||
@@ -582,8 +580,7 @@ static const struct file_operations fops_xmit = { | |||
582 | static ssize_t read_file_recv(struct file *file, char __user *user_buf, | 580 | static ssize_t read_file_recv(struct file *file, char __user *user_buf, |
583 | size_t count, loff_t *ppos) | 581 | size_t count, loff_t *ppos) |
584 | { | 582 | { |
585 | struct ath9k_htc_priv *priv = | 583 | struct ath9k_htc_priv *priv = file->private_data; |
586 | (struct ath9k_htc_priv *) file->private_data; | ||
587 | char buf[512]; | 584 | char buf[512]; |
588 | unsigned int len = 0; | 585 | unsigned int len = 0; |
589 | 586 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index 088a2c13f59b..7b25d1468358 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -1267,7 +1267,7 @@ static ssize_t iwl_dbgfs_ucode_tracing_read(struct file *file, | |||
1267 | char __user *user_buf, | 1267 | char __user *user_buf, |
1268 | size_t count, loff_t *ppos) { | 1268 | size_t count, loff_t *ppos) { |
1269 | 1269 | ||
1270 | struct iwl_priv *priv = (struct iwl_priv *)file->private_data; | 1270 | struct iwl_priv *priv = file->private_data; |
1271 | int pos = 0; | 1271 | int pos = 0; |
1272 | char buf[128]; | 1272 | char buf[128]; |
1273 | const size_t bufsz = sizeof(buf); | 1273 | const size_t bufsz = sizeof(buf); |
@@ -1317,7 +1317,7 @@ static ssize_t iwl_dbgfs_rxon_flags_read(struct file *file, | |||
1317 | char __user *user_buf, | 1317 | char __user *user_buf, |
1318 | size_t count, loff_t *ppos) { | 1318 | size_t count, loff_t *ppos) { |
1319 | 1319 | ||
1320 | struct iwl_priv *priv = (struct iwl_priv *)file->private_data; | 1320 | struct iwl_priv *priv = file->private_data; |
1321 | int len = 0; | 1321 | int len = 0; |
1322 | char buf[20]; | 1322 | char buf[20]; |
1323 | 1323 | ||
@@ -1329,7 +1329,7 @@ static ssize_t iwl_dbgfs_rxon_filter_flags_read(struct file *file, | |||
1329 | char __user *user_buf, | 1329 | char __user *user_buf, |
1330 | size_t count, loff_t *ppos) { | 1330 | size_t count, loff_t *ppos) { |
1331 | 1331 | ||
1332 | struct iwl_priv *priv = (struct iwl_priv *)file->private_data; | 1332 | struct iwl_priv *priv = file->private_data; |
1333 | int len = 0; | 1333 | int len = 0; |
1334 | char buf[20]; | 1334 | char buf[20]; |
1335 | 1335 | ||
@@ -1342,7 +1342,7 @@ static ssize_t iwl_dbgfs_fh_reg_read(struct file *file, | |||
1342 | char __user *user_buf, | 1342 | char __user *user_buf, |
1343 | size_t count, loff_t *ppos) | 1343 | size_t count, loff_t *ppos) |
1344 | { | 1344 | { |
1345 | struct iwl_priv *priv = (struct iwl_priv *)file->private_data; | 1345 | struct iwl_priv *priv = file->private_data; |
1346 | char *buf; | 1346 | char *buf; |
1347 | int pos = 0; | 1347 | int pos = 0; |
1348 | ssize_t ret = -EFAULT; | 1348 | ssize_t ret = -EFAULT; |
@@ -1404,7 +1404,7 @@ static ssize_t iwl_dbgfs_plcp_delta_read(struct file *file, | |||
1404 | char __user *user_buf, | 1404 | char __user *user_buf, |
1405 | size_t count, loff_t *ppos) { | 1405 | size_t count, loff_t *ppos) { |
1406 | 1406 | ||
1407 | struct iwl_priv *priv = (struct iwl_priv *)file->private_data; | 1407 | struct iwl_priv *priv = file->private_data; |
1408 | int pos = 0; | 1408 | int pos = 0; |
1409 | char buf[12]; | 1409 | char buf[12]; |
1410 | const size_t bufsz = sizeof(buf); | 1410 | const size_t bufsz = sizeof(buf); |
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c index acaf81164624..3db621b18a2f 100644 --- a/drivers/net/wireless/libertas/debugfs.c +++ b/drivers/net/wireless/libertas/debugfs.c | |||
@@ -905,7 +905,7 @@ static ssize_t lbs_debugfs_read(struct file *file, char __user *userbuf, | |||
905 | 905 | ||
906 | p = buf; | 906 | p = buf; |
907 | 907 | ||
908 | d = (struct debug_data *)file->private_data; | 908 | d = file->private_data; |
909 | 909 | ||
910 | for (i = 0; i < num_of_items; i++) { | 910 | for (i = 0; i < num_of_items; i++) { |
911 | if (d[i].size == 1) | 911 | if (d[i].size == 1) |
@@ -944,7 +944,7 @@ static ssize_t lbs_debugfs_write(struct file *f, const char __user *buf, | |||
944 | char *p0; | 944 | char *p0; |
945 | char *p1; | 945 | char *p1; |
946 | char *p2; | 946 | char *p2; |
947 | struct debug_data *d = (struct debug_data *)f->private_data; | 947 | struct debug_data *d = f->private_data; |
948 | 948 | ||
949 | pdata = kmalloc(cnt, GFP_KERNEL); | 949 | pdata = kmalloc(cnt, GFP_KERNEL); |
950 | if (pdata == NULL) | 950 | if (pdata == NULL) |