aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8187se
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-08-12 01:04:21 -0400
committerRusty Russell <rusty@rustcorp.com.au>2010-08-11 09:34:27 -0400
commitdca41306395eab37e222ff9e72765e692fcc7251 (patch)
tree9e61d3d3d60933524c09cf6e82b70733352df514 /drivers/staging/rtl8187se
parent546970bc6afc7fb37447fbac09b82c7884662c21 (diff)
param: remove unnecessary writable charp
sysfs-writable charp arguments need to be locked against modification (since the old ones may be kfreed underneath us). String arguments are much simpler, so use them for small strings (eg. IFNAMSIZ). lkdtm only uses the parameters at module initialization time, so there's not much point making them writable. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: M. Mohan Kumar <mohan@in.ibm.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Jeff Mahoney <jeffm@suse.com> Cc: Julia Lawall <julia@diku.dk> Cc: devel@driverdev.osuosl.org
Diffstat (limited to 'drivers/staging/rtl8187se')
-rw-r--r--drivers/staging/rtl8187se/r8180_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 49ab9fa9ffa..ed7457bc24e 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -61,7 +61,7 @@ static struct pci_device_id rtl8180_pci_id_tbl[] __devinitdata = {
61}; 61};
62 62
63 63
64static char *ifname = "wlan%d"; 64static char ifname[IFNAMSIZ] = "wlan%d";
65static int hwseqnum = 0; 65static int hwseqnum = 0;
66static int hwwep = 0; 66static int hwwep = 0;
67static int channels = 0x3fff; 67static int channels = 0x3fff;
@@ -72,7 +72,7 @@ MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>");
72MODULE_DESCRIPTION("Linux driver for Realtek RTL8180 / RTL8185 WiFi cards"); 72MODULE_DESCRIPTION("Linux driver for Realtek RTL8180 / RTL8185 WiFi cards");
73 73
74 74
75module_param(ifname, charp, S_IRUGO|S_IWUSR); 75module_param_string(ifname, ifname, sizeof(ifname), S_IRUGO|S_IWUSR);
76module_param(hwseqnum, int, S_IRUGO|S_IWUSR); 76module_param(hwseqnum, int, S_IRUGO|S_IWUSR);
77module_param(hwwep, int, S_IRUGO|S_IWUSR); 77module_param(hwwep, int, S_IRUGO|S_IWUSR);
78module_param(channels, int, S_IRUGO|S_IWUSR); 78module_param(channels, int, S_IRUGO|S_IWUSR);
@@ -3609,7 +3609,7 @@ static int __devinit rtl8180_pci_probe(struct pci_dev *pdev,
3609 3609
3610 if (dev_alloc_name(dev, ifname) < 0) { 3610 if (dev_alloc_name(dev, ifname) < 0) {
3611 DMESG("Oops: devname already taken! Trying wlan%%d...\n"); 3611 DMESG("Oops: devname already taken! Trying wlan%%d...\n");
3612 ifname = "wlan%d"; 3612 strcpy(ifname, "wlan%d");
3613 dev_alloc_name(dev, ifname); 3613 dev_alloc_name(dev, ifname);
3614 } 3614 }
3615 3615