summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/st5481.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-02-19 19:52:38 -0800
committerJoe Perches <joe@perches.com>2012-02-21 09:04:01 -0800
commit475be4d85a274d0961593db41cf85689db1d583c (patch)
treeb2b8931eb747794730522c3cf1898e46948527b9 /drivers/isdn/hisax/st5481.h
parent0b0a635f79f91f3755b6518627ea06dd0dbfd523 (diff)
downloadlinux-stable-475be4d85a274d0961593db41cf85689db1d583c.tar.gz
linux-stable-475be4d85a274d0961593db41cf85689db1d583c.tar.bz2
linux-stable-475be4d85a274d0961593db41cf85689db1d583c.zip
isdn: whitespace coding style cleanup
isdn source code uses a not-current coding style. Update the coding style used on a per-line basis so that git diff -w shows only elided blank lines at EOF. Done with emacs and some scripts and some typing. Built x86 allyesconfig. No detected change in objdump -d or size. Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/isdn/hisax/st5481.h')
-rw-r--r--drivers/isdn/hisax/st5481.h98
1 files changed, 49 insertions, 49 deletions
diff --git a/drivers/isdn/hisax/st5481.h b/drivers/isdn/hisax/st5481.h
index b9054cb7a0da..8cd2d8277426 100644
--- a/drivers/isdn/hisax/st5481.h
+++ b/drivers/isdn/hisax/st5481.h
@@ -4,7 +4,7 @@
* Author Frode Isaksen
* Copyright 2001 by Frode Isaksen <fisaksen@bewan.com>
* 2001 by Kai Germaschewski <kai.germaschewski@gmx.de>
- *
+ *
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
@@ -31,7 +31,7 @@
#define EP_B2_IN 0x05U /* B2 channel in */
#define EP_D_OUT 0x06U /* D channel out */
#define EP_D_IN 0x07U /* D channel in */
-
+
// Number of isochronous packets. With 20 packets we get
// 50 interrupts/sec for each endpoint.
@@ -51,7 +51,7 @@
#define B_FLOW_ADJUST 2
// Registers that are written using vendor specific device request
-// on endpoint 0.
+// on endpoint 0.
#define LBA 0x02 /* S loopback */
#define SET_DEFAULT 0x06 /* Soft reset */
@@ -84,7 +84,7 @@
#define FFMSK_B2 0x50 /* B2 fifo interrupt MASK register */
#define GPIO_DIR 0x52 /* GPIO pins direction registers */
#define GPIO_OUT 0x53 /* GPIO pins output register */
-#define GPIO_IN 0x54 /* GPIO pins input register */
+#define GPIO_IN 0x54 /* GPIO pins input register */
#define TXCI 0x56 /* CI command to be transmitted */
@@ -124,8 +124,8 @@
#define IN_COUNTER_ZEROED 0x02 /* In down-counter reached 0 */
#define OUT_COUNTER_ZEROED 0x01 /* Out down-counter reached 0 */
-#define ANY_REC_INT (IN_OVERRUN+IN_UP+IN_DOWN+IN_COUNTER_ZEROED)
-#define ANY_XMIT_INT (OUT_UNDERRUN+OUT_UP+OUT_DOWN+OUT_COUNTER_ZEROED)
+#define ANY_REC_INT (IN_OVERRUN + IN_UP + IN_DOWN + IN_COUNTER_ZEROED)
+#define ANY_XMIT_INT (OUT_UNDERRUN + OUT_UP + OUT_DOWN + OUT_COUNTER_ZEROED)
// Level 1 commands that are sent using the TXCI device request
@@ -158,7 +158,7 @@ enum {
ST_DOUT_NORMAL,
ST_DOUT_WAIT_FOR_UNDERRUN,
- ST_DOUT_WAIT_FOR_NOT_BUSY,
+ ST_DOUT_WAIT_FOR_NOT_BUSY,
ST_DOUT_WAIT_FOR_STOP,
ST_DOUT_WAIT_FOR_RESET,
};
@@ -188,9 +188,9 @@ enum {
ST_L1_F8,
};
-#define L1_STATE_COUNT (ST_L1_F8+1)
+#define L1_STATE_COUNT (ST_L1_F8 + 1)
-// The first 16 entries match the Level 1 indications that
+// The first 16 entries match the Level 1 indications that
// are found at offset 4 (CCIST) in the interrupt packet
enum {
@@ -217,14 +217,14 @@ enum {
#define L1_EVENT_COUNT (EV_TIMER3 + 1)
-#define ERR(format, arg...) \
-printk(KERN_ERR "%s:%s: " format "\n" , __FILE__, __func__ , ## arg)
+#define ERR(format, arg...) \
+ printk(KERN_ERR "%s:%s: " format "\n" , __FILE__, __func__ , ## arg)
-#define WARNING(format, arg...) \
-printk(KERN_WARNING "%s:%s: " format "\n" , __FILE__, __func__ , ## arg)
+#define WARNING(format, arg...) \
+ printk(KERN_WARNING "%s:%s: " format "\n" , __FILE__, __func__ , ## arg)
-#define INFO(format, arg...) \
-printk(KERN_INFO "%s:%s: " format "\n" , __FILE__, __func__ , ## arg)
+#define INFO(format, arg...) \
+ printk(KERN_INFO "%s:%s: " format "\n" , __FILE__, __func__ , ## arg)
#include <linux/isdn/hdlc.h>
#include "fsm.h"
@@ -237,7 +237,7 @@ printk(KERN_INFO "%s:%s: " format "\n" , __FILE__, __func__ , ## arg)
/* Generic FIFO structure */
struct fifo {
- u_char r,w,count,size;
+ u_char r, w, count, size;
spinlock_t lock;
};
@@ -269,7 +269,7 @@ static inline int fifo_add(struct fifo *fifo)
index = -1;
} else {
// Return index where to get the next data to add to the FIFO
- index = fifo->w++ & (fifo->size-1);
+ index = fifo->w++ & (fifo->size - 1);
fifo->count++;
}
spin_unlock_irqrestore(&fifo->lock, flags);
@@ -294,7 +294,7 @@ static inline int fifo_remove(struct fifo *fifo)
index = -1;
} else {
// Return index where to get the next data from the FIFO
- index = fifo->r++ & (fifo->size-1);
+ index = fifo->r++ & (fifo->size - 1);
fifo->count--;
}
spin_unlock_irqrestore(&fifo->lock, flags);
@@ -311,14 +311,14 @@ typedef struct ctrl_msg {
struct usb_ctrlrequest dr;
ctrl_complete_t complete;
void *context;
-} ctrl_msg;
+} ctrl_msg;
/* FIFO of ctrl messages waiting to be sent */
#define MAX_EP0_MSG 16
struct ctrl_msg_fifo {
struct fifo f;
struct ctrl_msg data[MAX_EP0_MSG];
-};
+};
#define MAX_DFRAME_LEN_L1 300
#define HSCX_BUFMAX 4096
@@ -330,7 +330,7 @@ struct st5481_ctrl {
};
struct st5481_intr {
- // struct evt_fifo evt_fifo;
+ // struct evt_fifo evt_fifo;
struct urb *urb;
};
@@ -407,21 +407,21 @@ struct st5481_adapter {
* Submit an URB with error reporting. This is a macro so
* the __func__ returns the caller function name.
*/
-#define SUBMIT_URB(urb, mem_flags) \
-({ \
- int status; \
- if ((status = usb_submit_urb(urb, mem_flags)) < 0) { \
- WARNING("usb_submit_urb failed,status=%d", status); \
- } \
- status; \
-})
+#define SUBMIT_URB(urb, mem_flags) \
+ ({ \
+ int status; \
+ if ((status = usb_submit_urb(urb, mem_flags)) < 0) { \
+ WARNING("usb_submit_urb failed,status=%d", status); \
+ } \
+ status; \
+ })
/*
* USB double buffering, return the URB index (0 or 1).
*/
static inline int get_buf_nr(struct urb *urbs[], struct urb *urb)
{
- return (urbs[0]==urb ? 0 : 1);
+ return (urbs[0] == urb ? 0 : 1);
}
/* ---------------------------------------------------------------------- */
@@ -442,17 +442,17 @@ void st5481_d_exit(void);
/* USB */
void st5481_ph_command(struct st5481_adapter *adapter, unsigned int command);
-int st5481_setup_isocpipes(struct urb* urb[2], struct usb_device *dev,
+int st5481_setup_isocpipes(struct urb *urb[2], struct usb_device *dev,
unsigned int pipe, int num_packets,
int packet_size, int buf_size,
usb_complete_t complete, void *context);
-void st5481_release_isocpipes(struct urb* urb[2]);
+void st5481_release_isocpipes(struct urb *urb[2]);
void st5481_usb_pipe_reset(struct st5481_adapter *adapter,
- u_char pipe, ctrl_complete_t complete, void *context);
+ u_char pipe, ctrl_complete_t complete, void *context);
void st5481_usb_device_ctrl_msg(struct st5481_adapter *adapter,
- u8 request, u16 value,
- ctrl_complete_t complete, void *context);
+ u8 request, u16 value,
+ ctrl_complete_t complete, void *context);
int st5481_setup_usb(struct st5481_adapter *adapter);
void st5481_release_usb(struct st5481_adapter *adapter);
void st5481_start(struct st5481_adapter *adapter);
@@ -468,18 +468,18 @@ extern int st5481_debug;
#ifdef CONFIG_HISAX_DEBUG
-#define DBG_ISO_PACKET(level,urb) \
- if (level & __debug_variable) dump_iso_packet(__func__,urb)
+#define DBG_ISO_PACKET(level, urb) \
+ if (level & __debug_variable) dump_iso_packet(__func__, urb)
static void __attribute__((unused))
dump_iso_packet(const char *name, struct urb *urb)
{
- int i,j;
- int len,ofs;
+ int i, j;
+ int len, ofs;
u_char *data;
printk(KERN_DEBUG "%s: packets=%d,errors=%d\n",
- name,urb->number_of_packets,urb->error_count);
+ name, urb->number_of_packets, urb->error_count);
for (i = 0; i < urb->number_of_packets; ++i) {
if (urb->pipe & USB_DIR_IN) {
len = urb->iso_frame_desc[i].actual_length;
@@ -487,11 +487,11 @@ dump_iso_packet(const char *name, struct urb *urb)
len = urb->iso_frame_desc[i].length;
}
ofs = urb->iso_frame_desc[i].offset;
- printk(KERN_DEBUG "len=%.2d,ofs=%.3d ",len,ofs);
+ printk(KERN_DEBUG "len=%.2d,ofs=%.3d ", len, ofs);
if (len) {
- data = urb->transfer_buffer+ofs;
- for (j=0; j < len; j++) {
- printk ("%.2x", data[j]);
+ data = urb->transfer_buffer + ofs;
+ for (j = 0; j < len; j++) {
+ printk("%.2x", data[j]);
}
}
printk("\n");
@@ -513,17 +513,17 @@ static inline const char *ST5481_CMD_string(int evt)
case ST5481_CMD_ARL: return "ARL";
case ST5481_CMD_PDN: return "PDN";
};
-
- sprintf(s,"0x%x",evt);
+
+ sprintf(s, "0x%x", evt);
return s;
-}
+}
#else
-#define DBG_ISO_PACKET(level,urb) do {} while (0)
+#define DBG_ISO_PACKET(level, urb) do {} while (0)
#endif
-#endif
+#endif