diff options
-rw-r--r-- | drivers/net/wireless/airo.c | 33 | ||||
-rw-r--r-- | fs/proc/generic.c | 1 |
2 files changed, 12 insertions, 22 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 57a79b0475f6..eb050efcdb46 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -4500,17 +4500,15 @@ static int setup_proc_entry( struct net_device *dev, | |||
4500 | struct proc_dir_entry *entry; | 4500 | struct proc_dir_entry *entry; |
4501 | /* First setup the device directory */ | 4501 | /* First setup the device directory */ |
4502 | strcpy(apriv->proc_name,dev->name); | 4502 | strcpy(apriv->proc_name,dev->name); |
4503 | apriv->proc_entry = create_proc_entry(apriv->proc_name, | 4503 | apriv->proc_entry = proc_mkdir_mode(apriv->proc_name, airo_perm, |
4504 | S_IFDIR|airo_perm, | 4504 | airo_entry); |
4505 | airo_entry); | ||
4506 | if (!apriv->proc_entry) | 4505 | if (!apriv->proc_entry) |
4507 | goto fail; | 4506 | goto fail; |
4508 | apriv->proc_entry->uid = proc_uid; | 4507 | apriv->proc_entry->uid = proc_uid; |
4509 | apriv->proc_entry->gid = proc_gid; | 4508 | apriv->proc_entry->gid = proc_gid; |
4510 | 4509 | ||
4511 | /* Setup the StatsDelta */ | 4510 | /* Setup the StatsDelta */ |
4512 | entry = proc_create_data("StatsDelta", | 4511 | entry = proc_create_data("StatsDelta", S_IRUGO & proc_perm, |
4513 | S_IFREG | (S_IRUGO&proc_perm), | ||
4514 | apriv->proc_entry, &proc_statsdelta_ops, dev); | 4512 | apriv->proc_entry, &proc_statsdelta_ops, dev); |
4515 | if (!entry) | 4513 | if (!entry) |
4516 | goto fail_stats_delta; | 4514 | goto fail_stats_delta; |
@@ -4518,8 +4516,7 @@ static int setup_proc_entry( struct net_device *dev, | |||
4518 | entry->gid = proc_gid; | 4516 | entry->gid = proc_gid; |
4519 | 4517 | ||
4520 | /* Setup the Stats */ | 4518 | /* Setup the Stats */ |
4521 | entry = proc_create_data("Stats", | 4519 | entry = proc_create_data("Stats", S_IRUGO & proc_perm, |
4522 | S_IFREG | (S_IRUGO&proc_perm), | ||
4523 | apriv->proc_entry, &proc_stats_ops, dev); | 4520 | apriv->proc_entry, &proc_stats_ops, dev); |
4524 | if (!entry) | 4521 | if (!entry) |
4525 | goto fail_stats; | 4522 | goto fail_stats; |
@@ -4527,8 +4524,7 @@ static int setup_proc_entry( struct net_device *dev, | |||
4527 | entry->gid = proc_gid; | 4524 | entry->gid = proc_gid; |
4528 | 4525 | ||
4529 | /* Setup the Status */ | 4526 | /* Setup the Status */ |
4530 | entry = proc_create_data("Status", | 4527 | entry = proc_create_data("Status", S_IRUGO & proc_perm, |
4531 | S_IFREG | (S_IRUGO&proc_perm), | ||
4532 | apriv->proc_entry, &proc_status_ops, dev); | 4528 | apriv->proc_entry, &proc_status_ops, dev); |
4533 | if (!entry) | 4529 | if (!entry) |
4534 | goto fail_status; | 4530 | goto fail_status; |
@@ -4536,8 +4532,7 @@ static int setup_proc_entry( struct net_device *dev, | |||
4536 | entry->gid = proc_gid; | 4532 | entry->gid = proc_gid; |
4537 | 4533 | ||
4538 | /* Setup the Config */ | 4534 | /* Setup the Config */ |
4539 | entry = proc_create_data("Config", | 4535 | entry = proc_create_data("Config", proc_perm, |
4540 | S_IFREG | proc_perm, | ||
4541 | apriv->proc_entry, &proc_config_ops, dev); | 4536 | apriv->proc_entry, &proc_config_ops, dev); |
4542 | if (!entry) | 4537 | if (!entry) |
4543 | goto fail_config; | 4538 | goto fail_config; |
@@ -4545,8 +4540,7 @@ static int setup_proc_entry( struct net_device *dev, | |||
4545 | entry->gid = proc_gid; | 4540 | entry->gid = proc_gid; |
4546 | 4541 | ||
4547 | /* Setup the SSID */ | 4542 | /* Setup the SSID */ |
4548 | entry = proc_create_data("SSID", | 4543 | entry = proc_create_data("SSID", proc_perm, |
4549 | S_IFREG | proc_perm, | ||
4550 | apriv->proc_entry, &proc_SSID_ops, dev); | 4544 | apriv->proc_entry, &proc_SSID_ops, dev); |
4551 | if (!entry) | 4545 | if (!entry) |
4552 | goto fail_ssid; | 4546 | goto fail_ssid; |
@@ -4554,8 +4548,7 @@ static int setup_proc_entry( struct net_device *dev, | |||
4554 | entry->gid = proc_gid; | 4548 | entry->gid = proc_gid; |
4555 | 4549 | ||
4556 | /* Setup the APList */ | 4550 | /* Setup the APList */ |
4557 | entry = proc_create_data("APList", | 4551 | entry = proc_create_data("APList", proc_perm, |
4558 | S_IFREG | proc_perm, | ||
4559 | apriv->proc_entry, &proc_APList_ops, dev); | 4552 | apriv->proc_entry, &proc_APList_ops, dev); |
4560 | if (!entry) | 4553 | if (!entry) |
4561 | goto fail_aplist; | 4554 | goto fail_aplist; |
@@ -4563,8 +4556,7 @@ static int setup_proc_entry( struct net_device *dev, | |||
4563 | entry->gid = proc_gid; | 4556 | entry->gid = proc_gid; |
4564 | 4557 | ||
4565 | /* Setup the BSSList */ | 4558 | /* Setup the BSSList */ |
4566 | entry = proc_create_data("BSSList", | 4559 | entry = proc_create_data("BSSList", proc_perm, |
4567 | S_IFREG | proc_perm, | ||
4568 | apriv->proc_entry, &proc_BSSList_ops, dev); | 4560 | apriv->proc_entry, &proc_BSSList_ops, dev); |
4569 | if (!entry) | 4561 | if (!entry) |
4570 | goto fail_bsslist; | 4562 | goto fail_bsslist; |
@@ -4572,8 +4564,7 @@ static int setup_proc_entry( struct net_device *dev, | |||
4572 | entry->gid = proc_gid; | 4564 | entry->gid = proc_gid; |
4573 | 4565 | ||
4574 | /* Setup the WepKey */ | 4566 | /* Setup the WepKey */ |
4575 | entry = proc_create_data("WepKey", | 4567 | entry = proc_create_data("WepKey", proc_perm, |
4576 | S_IFREG | proc_perm, | ||
4577 | apriv->proc_entry, &proc_wepkey_ops, dev); | 4568 | apriv->proc_entry, &proc_wepkey_ops, dev); |
4578 | if (!entry) | 4569 | if (!entry) |
4579 | goto fail_wepkey; | 4570 | goto fail_wepkey; |
@@ -5705,9 +5696,7 @@ static int __init airo_init_module( void ) | |||
5705 | { | 5696 | { |
5706 | int i; | 5697 | int i; |
5707 | 5698 | ||
5708 | airo_entry = create_proc_entry("driver/aironet", | 5699 | airo_entry = proc_mkdir_mode("driver/aironet", airo_perm, NULL); |
5709 | S_IFDIR | airo_perm, | ||
5710 | NULL); | ||
5711 | 5700 | ||
5712 | if (airo_entry) { | 5701 | if (airo_entry) { |
5713 | airo_entry->uid = proc_uid; | 5702 | airo_entry->uid = proc_uid; |
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index f1281339b6fa..f1637f17c37c 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c | |||
@@ -674,6 +674,7 @@ struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, | |||
674 | } | 674 | } |
675 | return ent; | 675 | return ent; |
676 | } | 676 | } |
677 | EXPORT_SYMBOL(proc_mkdir_mode); | ||
677 | 678 | ||
678 | struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, | 679 | struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, |
679 | struct proc_dir_entry *parent) | 680 | struct proc_dir_entry *parent) |