diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-11-16 15:04:54 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-18 14:19:20 -0800 |
commit | 0e1af73ddeb9747fd1aa8b0c6040b8b3709ae9bb (patch) | |
tree | 33b00a1779e951d1cb7e79d9be2cc923a7a6e17d /drivers/staging/wilc1000/wilc_debugfs.c | |
parent | 1608c4034eee98e3f24ffa9100f96b893d5e5492 (diff) | |
download | op-kernel-dev-0e1af73ddeb9747fd1aa8b0c6040b8b3709ae9bb.zip op-kernel-dev-0e1af73ddeb9747fd1aa8b0c6040b8b3709ae9bb.tar.gz |
staging/wilc1000: use proper naming for global symbols
There are many global symbols in the wilc1000 driver, some of them
with names like "DEBUG_LEVEL" or "probe" that are not acceptable
for globals in the linux kernel as they may easily conflict with other
(equally broken) drivers.
This renames all the globals that do not already start with
wilc or a variation of that to start with wilc_ and to follow
the usual naming conventions.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_debugfs.c')
-rw-r--r-- | drivers/staging/wilc1000/wilc_debugfs.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c index ae11186..d70f96f 100644 --- a/drivers/staging/wilc1000/wilc_debugfs.c +++ b/drivers/staging/wilc1000/wilc_debugfs.c @@ -26,8 +26,8 @@ static struct dentry *wilc_dir; #define DBG_REGION_ALL (GENERIC_DBG | HOSTAPD_DBG | HOSTINF_DBG | CORECONFIG_DBG | CFG80211_DBG | INT_DBG | TX_DBG | RX_DBG | LOCK_DBG | INIT_DBG | BUS_DBG | MEM_DBG) #define DBG_LEVEL_ALL (DEBUG | INFO | WRN | ERR) -atomic_t REGION = ATOMIC_INIT(INIT_DBG | GENERIC_DBG | CFG80211_DBG | FIRM_DBG | HOSTAPD_DBG); -atomic_t DEBUG_LEVEL = ATOMIC_INIT(ERR); +atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG | GENERIC_DBG | CFG80211_DBG | FIRM_DBG | HOSTAPD_DBG); +atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR); /* * -------------------------------------------------------------------------------- @@ -43,7 +43,7 @@ static ssize_t wilc_debug_level_read(struct file *file, char __user *userbuf, si if (*ppos > 0) return 0; - res = scnprintf(buf, sizeof(buf), "Debug Level: %x\n", atomic_read(&DEBUG_LEVEL)); + res = scnprintf(buf, sizeof(buf), "Debug Level: %x\n", atomic_read(&WILC_DEBUG_LEVEL)); return simple_read_from_buffer(userbuf, count, ppos, buf, res); } @@ -59,11 +59,11 @@ static ssize_t wilc_debug_level_write(struct file *filp, const char __user *buf, return ret; if (flag > DBG_LEVEL_ALL) { - printk("%s, value (0x%08x) is out of range, stay previous flag (0x%08x)\n", __func__, flag, atomic_read(&DEBUG_LEVEL)); + printk("%s, value (0x%08x) is out of range, stay previous flag (0x%08x)\n", __func__, flag, atomic_read(&WILC_DEBUG_LEVEL)); return -EINVAL; } - atomic_set(&DEBUG_LEVEL, (int)flag); + atomic_set(&WILC_DEBUG_LEVEL, (int)flag); if (flag == 0) printk("Debug-level disabled\n"); @@ -82,7 +82,7 @@ static ssize_t wilc_debug_region_read(struct file *file, char __user *userbuf, s if (*ppos > 0) return 0; - res = scnprintf(buf, sizeof(buf), "Debug region: %x\n", atomic_read(®ION)); + res = scnprintf(buf, sizeof(buf), "Debug region: %x\n", atomic_read(&WILC_REGION)); return simple_read_from_buffer(userbuf, count, ppos, buf, res); } @@ -102,12 +102,12 @@ static ssize_t wilc_debug_region_write(struct file *filp, const char *buf, size_ flag = buffer[0] - '0'; if (flag > DBG_REGION_ALL) { - printk("%s, value (0x%08x) is out of range, stay previous flag (0x%08x)\n", __func__, flag, atomic_read(®ION)); + printk("%s, value (0x%08x) is out of range, stay previous flag (0x%08x)\n", __func__, flag, atomic_read(&WILC_REGION)); return -EFAULT; } - atomic_set(®ION, (int)flag); - printk("new debug-region is %x\n", atomic_read(®ION)); + atomic_set(&WILC_REGION, (int)flag); + printk("new debug-region is %x\n", atomic_read(&WILC_REGION)); return count; } |