summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/airo.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2013-04-12 00:38:51 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-01 17:29:18 -0400
commit271a15eabe094538d958dc68ccfc9c36b699247a (patch)
tree586e33f88cece63828614b2a2f0e92007064f024 /drivers/net/wireless/airo.c
parent2f96b8c1d5d492c1d0457b253015330f844136f6 (diff)
proc: Supply PDE attribute setting accessor functions
Supply accessor functions to set attributes in proc_dir_entry structs. The following are supplied: proc_set_size() and proc_set_user(). Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> cc: linuxppc-dev@lists.ozlabs.org cc: linux-media@vger.kernel.org cc: netdev@vger.kernel.org cc: linux-wireless@vger.kernel.org cc: linux-pci@vger.kernel.org cc: netfilter-devel@vger.kernel.org cc: alsa-devel@alsa-project.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r--drivers/net/wireless/airo.c34
1 files changed, 11 insertions, 23 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 66e398d4730d..21d02335b46f 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -4507,73 +4507,63 @@ static int setup_proc_entry( struct net_device *dev,
airo_entry);
if (!apriv->proc_entry)
goto fail;
- apriv->proc_entry->uid = proc_kuid;
- apriv->proc_entry->gid = proc_kgid;
+ proc_set_user(apriv->proc_entry, proc_kuid, proc_kgid);
/* Setup the StatsDelta */
entry = proc_create_data("StatsDelta", S_IRUGO & proc_perm,
apriv->proc_entry, &proc_statsdelta_ops, dev);
if (!entry)
goto fail_stats_delta;
- entry->uid = proc_kuid;
- entry->gid = proc_kgid;
+ proc_set_user(entry, proc_kuid, proc_kgid);
/* Setup the Stats */
entry = proc_create_data("Stats", S_IRUGO & proc_perm,
apriv->proc_entry, &proc_stats_ops, dev);
if (!entry)
goto fail_stats;
- entry->uid = proc_kuid;
- entry->gid = proc_kgid;
+ proc_set_user(entry, proc_kuid, proc_kgid);
/* Setup the Status */
entry = proc_create_data("Status", S_IRUGO & proc_perm,
apriv->proc_entry, &proc_status_ops, dev);
if (!entry)
goto fail_status;
- entry->uid = proc_kuid;
- entry->gid = proc_kgid;
+ proc_set_user(entry, proc_kuid, proc_kgid);
/* Setup the Config */
entry = proc_create_data("Config", proc_perm,
apriv->proc_entry, &proc_config_ops, dev);
if (!entry)
goto fail_config;
- entry->uid = proc_kuid;
- entry->gid = proc_kgid;
+ proc_set_user(entry, proc_kuid, proc_kgid);
/* Setup the SSID */
entry = proc_create_data("SSID", proc_perm,
apriv->proc_entry, &proc_SSID_ops, dev);
if (!entry)
goto fail_ssid;
- entry->uid = proc_kuid;
- entry->gid = proc_kgid;
+ proc_set_user(entry, proc_kuid, proc_kgid);
/* Setup the APList */
entry = proc_create_data("APList", proc_perm,
apriv->proc_entry, &proc_APList_ops, dev);
if (!entry)
goto fail_aplist;
- entry->uid = proc_kuid;
- entry->gid = proc_kgid;
+ proc_set_user(entry, proc_kuid, proc_kgid);
/* Setup the BSSList */
entry = proc_create_data("BSSList", proc_perm,
apriv->proc_entry, &proc_BSSList_ops, dev);
if (!entry)
goto fail_bsslist;
- entry->uid = proc_kuid;
- entry->gid = proc_kgid;
+ proc_set_user(entry, proc_kuid, proc_kgid);
/* Setup the WepKey */
entry = proc_create_data("WepKey", proc_perm,
apriv->proc_entry, &proc_wepkey_ops, dev);
if (!entry)
goto fail_wepkey;
- entry->uid = proc_kuid;
- entry->gid = proc_kgid;
-
+ proc_set_user(entry, proc_kuid, proc_kgid);
return 0;
fail_wepkey:
@@ -5695,10 +5685,8 @@ static int __init airo_init_module( void )
airo_entry = proc_mkdir_mode("driver/aironet", airo_perm, NULL);
- if (airo_entry) {
- airo_entry->uid = proc_kuid;
- airo_entry->gid = proc_kgid;
- }
+ if (airo_entry)
+ proc_set_user(airo_entry, proc_kuid, proc_kgid);
for (i = 0; i < 4 && io[i] && irq[i]; i++) {
airo_print_info("", "Trying to configure ISA adapter at irq=%d "