OSDN Git Service

staging: brcm80211: fix 'do not init statics to 0 or NULL'
authorJason Cooper <jason@lakedaemon.net>
Wed, 6 Oct 2010 14:08:01 +0000 (10:08 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Oct 2010 15:20:42 +0000 (08:20 -0700)
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc_linux.c
drivers/staging/brcm80211/brcmfmac/dhd_common.c
drivers/staging/brcm80211/brcmfmac/dhd_linux.c
drivers/staging/brcm80211/brcmfmac/linux_osl.c
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
drivers/staging/brcm80211/brcmfmac/wl_iw.c

index f81823e..0301c1f 100644 (file)
@@ -70,7 +70,7 @@ struct bcmsdh_hc {
        spinlock_t irq_lock;
 #endif
 };
-static bcmsdh_hc_t *sdhcinfo = NULL;
+static bcmsdh_hc_t *sdhcinfo;
 
 /* driver info, initialized when bcmsdh_register is called */
 static bcmsdh_driver_t drvinfo = { NULL, NULL };
index 2b71e20..e596801 100644 (file)
@@ -60,7 +60,7 @@ int sdio_function_init(void);
 void sdio_function_cleanup(void);
 
 /* module param defaults */
-static int clockoverride = 0;
+static int clockoverride;
 
 module_param(clockoverride, int, 0644);
 MODULE_PARM_DESC(clockoverride, "SDIO card clock override");
index 849acf1..27c6976 100644 (file)
@@ -750,7 +750,7 @@ static void wl_show_host_event(wl_event_msg_t *event, void *event_data)
 
        case WLC_E_TRACE:
                {
-                       static uint32 seqnum_prev = 0;
+                       static uint32 seqnum_prev;
                        msgtrace_hdr_t hdr;
                        uint32 nblost;
                        char *s, *p;
index f7e253e..42e2f29 100644 (file)
@@ -58,8 +58,8 @@ struct semaphore wifi_control_sem;
 
 struct dhd_bus *g_bus;
 
-static struct wifi_platform_data *wifi_control_data = NULL;
-static struct resource *wifi_irqres = NULL;
+static struct wifi_platform_data *wifi_control_data;
+static struct resource *wifi_irqres;
 
 int wifi_get_irq_number(unsigned long *irq_flags_ptr)
 {
@@ -2542,7 +2542,7 @@ int dhd_os_ioctl_resp_wake(dhd_pub_t *pub)
 void dhd_os_wd_timer(void *bus, uint wdtick)
 {
        dhd_pub_t *pub = bus;
-       static uint save_dhd_watchdog_ms = 0;
+       static uint save_dhd_watchdog_ms;
        dhd_info_t *dhd = (dhd_info_t *) pub->info;
 
        /* don't start the wd until fw is loaded */
index f71a65b..c30422c 100644 (file)
@@ -42,7 +42,7 @@ typedef struct bcm_static_buf {
        unsigned char buf_use[MAX_STATIC_BUF_NUM];
 } bcm_static_buf_t;
 
-static bcm_static_buf_t *bcm_static_buf = 0;
+static bcm_static_buf_t *bcm_static_buf;
 
 #define MAX_STATIC_PKT_NUM 8
 typedef struct bcm_static_pkt {
@@ -51,7 +51,7 @@ typedef struct bcm_static_pkt {
        struct semaphore osl_pkt_sem;
        unsigned char pkt_use[MAX_STATIC_PKT_NUM * 2];
 } bcm_static_pkt_t;
-static bcm_static_pkt_t *bcm_static_skb = 0;
+static bcm_static_pkt_t *bcm_static_skb;
 #endif                         /* DHD_USE_STATIC_BUF */
 
 typedef struct bcm_mem_link {
index 341e108..3867293 100644 (file)
@@ -47,8 +47,8 @@
 #include <linux/firmware.h>
 #include <wl_cfg80211.h>
 
-static struct sdio_func *cfg80211_sdio_func = NULL;
-static struct wl_dev *wl_cfg80211_dev = NULL;
+static struct sdio_func *cfg80211_sdio_func;
+static struct wl_dev *wl_cfg80211_dev;
 
 uint32 wl_dbg_level = WL_DBG_ERR | WL_DBG_INFO;
 
index 944b7a0..b2514d1 100644 (file)
@@ -101,7 +101,7 @@ extern int dhd_wait_pend8021x(struct net_device *dev);
 #define IW_EVENT_IDX(cmd)      ((cmd) - IWEVFIRST)
 #endif
 
-static void *g_scan = NULL;
+static void *g_scan;
 static volatile uint g_scan_specified_ssid;
 static wlc_ssid_t g_specific_ssid;