summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2012-01-11 15:17:42 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2012-01-11 15:17:42 +0000
commit386a23551597205371d541080645bda02ab5b35f (patch)
treed79259dd2bbc6153665ce9857f30b237c60609cd
parentd95c7702f7ca7bacad21b890724964072139260d (diff)
xpp: style - Remove 0/NULL static initializers
* Applied via: perl -pi -e 's/(\bstatic\b[^=]*?)\s*=\s*(0|NULL)\s*;/$1;/' "$@" Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-By: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10423 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/xpp/card_fxs.c2
-rw-r--r--drivers/dahdi/xpp/parport_debug.c2
-rw-r--r--drivers/dahdi/xpp/xbus-core.c2
-rw-r--r--drivers/dahdi/xpp/xbus-pcm.c8
-rw-r--r--drivers/dahdi/xpp/xframe_queue.c2
-rw-r--r--drivers/dahdi/xpp/xpp_dahdi.c2
-rw-r--r--drivers/dahdi/xpp/xpp_usb.c4
-rw-r--r--drivers/dahdi/xpp/xproto.c2
8 files changed, 12 insertions, 12 deletions
diff --git a/drivers/dahdi/xpp/card_fxs.c b/drivers/dahdi/xpp/card_fxs.c
index 6484f91..91a1333 100644
--- a/drivers/dahdi/xpp/card_fxs.c
+++ b/drivers/dahdi/xpp/card_fxs.c
@@ -984,7 +984,7 @@ static int FXS_card_ioctl(xpd_t *xpd, int pos, unsigned int cmd, unsigned long a
if (get_user(val, (int __user *)arg))
return -EFAULT;
if(!vmwi_ioctl) {
- static bool notified = 0;
+ static bool notified;
if(!notified++)
LINE_NOTICE(xpd, pos,
diff --git a/drivers/dahdi/xpp/parport_debug.c b/drivers/dahdi/xpp/parport_debug.c
index 23c0b41..950e45d 100644
--- a/drivers/dahdi/xpp/parport_debug.c
+++ b/drivers/dahdi/xpp/parport_debug.c
@@ -30,7 +30,7 @@
#include <linux/parport.h>
#include "parport_debug.h"
-static struct parport *debug_sync_parport = NULL;
+static struct parport *debug_sync_parport;
static int parport_toggles[8]; /* 8 bit flip-flop */
void flip_parport_bit(unsigned char bitnum)
diff --git a/drivers/dahdi/xpp/xbus-core.c b/drivers/dahdi/xpp/xbus-core.c
index 3209e3e..c544963 100644
--- a/drivers/dahdi/xpp/xbus-core.c
+++ b/drivers/dahdi/xpp/xbus-core.c
@@ -73,7 +73,7 @@ static void transport_destroy(xbus_t *xbus);
/* Data structures */
static DEFINE_SPINLOCK(xbuses_lock);
#ifdef CONFIG_PROC_FS
-static struct proc_dir_entry *proc_xbuses = NULL;
+static struct proc_dir_entry *proc_xbuses;
#endif
static struct xbus_desc {
diff --git a/drivers/dahdi/xpp/xbus-pcm.c b/drivers/dahdi/xpp/xbus-pcm.c
index 4a00c55..9b51011 100644
--- a/drivers/dahdi/xpp/xbus-pcm.c
+++ b/drivers/dahdi/xpp/xbus-pcm.c
@@ -54,10 +54,10 @@ static struct xpp_ticker dahdi_ticker;
* The ref_ticker points to the current referece tick source.
* I.e: one of our AB or dahdi_ticker
*/
-static struct xpp_ticker *ref_ticker = NULL;
+static struct xpp_ticker *ref_ticker;
static DEFINE_SPINLOCK(ref_ticker_lock);
static DEFINE_SPINLOCK(elect_syncer_lock);
-static bool force_dahdi_sync = 0; /* from /sys/bus/astribanks/drivers/xppdrv/sync */
+static bool force_dahdi_sync; /* from /sys/bus/astribanks/drivers/xppdrv/sync */
static xbus_t *global_ticker;
static struct xpp_ticker global_ticks_series;
@@ -80,7 +80,7 @@ static struct xpp_ticker global_ticks_series;
#define SYNC_ADJ_SLOW 10000
#ifdef DAHDI_SYNC_TICK
-static unsigned int dahdi_tick_count = 0;
+static unsigned int dahdi_tick_count;
#endif
/*------------------------- SYNC Handling --------------------------*/
@@ -795,7 +795,7 @@ static bool pcm_valid(xpd_t *xpd, xpacket_t *pack)
/* FRAMES: include opcode in calculation */
good_len = RPACKET_HEADERSIZE + sizeof(xpp_line_t) + count * 8;
if(XPACKET_LEN(pack) != good_len) {
- static int rate_limit = 0;
+ static int rate_limit;
XPD_COUNTER(xpd, RECV_ERRORS)++;
if((rate_limit++ % 1000) <= 10) {
diff --git a/drivers/dahdi/xpp/xframe_queue.c b/drivers/dahdi/xpp/xframe_queue.c
index cc3ea6c..ce71f86 100644
--- a/drivers/dahdi/xpp/xframe_queue.c
+++ b/drivers/dahdi/xpp/xframe_queue.c
@@ -48,7 +48,7 @@ static void __xframe_dump_queue(struct xframe_queue *q)
static bool __xframe_enqueue(struct xframe_queue *q, xframe_t *xframe)
{
int ret = 1;
- static int overflow_cnt = 0;
+ static int overflow_cnt;
if(unlikely(q->disabled)) {
ret = 0;
diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c
index 2d2cbd9..a7d263a 100644
--- a/drivers/dahdi/xpp/xpp_dahdi.c
+++ b/drivers/dahdi/xpp/xpp_dahdi.c
@@ -836,7 +836,7 @@ int xpp_maint(struct dahdi_span *span, int cmd)
*/
static int xpp_watchdog(struct dahdi_span *span, int cause)
{
- static int rate_limit = 0;
+ static int rate_limit;
if((rate_limit++ % 1000) == 0)
DBG(GENERAL, "\n");
diff --git a/drivers/dahdi/xpp/xpp_usb.c b/drivers/dahdi/xpp/xpp_usb.c
index 7577901..ad83555 100644
--- a/drivers/dahdi/xpp/xpp_usb.c
+++ b/drivers/dahdi/xpp/xpp_usb.c
@@ -167,7 +167,7 @@ static struct xusb_counters {
#define MAX_PENDING_WRITES 100
-static KMEM_CACHE_T *xusb_cache = NULL;
+static KMEM_CACHE_T *xusb_cache;
typedef struct xusb xusb_t;
@@ -243,7 +243,7 @@ struct xusb {
static DEFINE_SPINLOCK(xusb_lock);
static xusb_t *xusb_array[MAX_BUSES] = {};
-static unsigned bus_count = 0;
+static unsigned bus_count;
/* prevent races between open() and disconnect() */
diff --git a/drivers/dahdi/xpp/xproto.c b/drivers/dahdi/xpp/xproto.c
index a1bc337..d0c44e6 100644
--- a/drivers/dahdi/xpp/xproto.c
+++ b/drivers/dahdi/xpp/xproto.c
@@ -317,7 +317,7 @@ void dump_packet(const char *msg, const xpacket_t *packet, bool debug)
printk(" BYTES: ");
for(i = 0; i < XPACKET_LEN(packet); i++) {
- static int limiter = 0;
+ static int limiter;
if(i >= sizeof(xpacket_t)) {
if(limiter < ERR_REPORT_LIMIT) {