[svn-commits] tzafrir: linux/trunk r10435 - /linux/trunk/drivers/dahdi/xpp/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Jan 12 11:12:52 CST 2012
Author: tzafrir
Date: Thu Jan 12 11:12:48 2012
New Revision: 10435
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10435
Log:
xpp: style - manual whitespace/line-breaks cleanup
Signed-off-by: Oron Peled <oron.peled at xorcom.com>
Acked-By: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Modified:
linux/trunk/drivers/dahdi/xpp/card_bri.c
linux/trunk/drivers/dahdi/xpp/card_echo.c
linux/trunk/drivers/dahdi/xpp/card_fxo.c
linux/trunk/drivers/dahdi/xpp/card_fxs.c
linux/trunk/drivers/dahdi/xpp/card_global.c
linux/trunk/drivers/dahdi/xpp/card_pri.c
linux/trunk/drivers/dahdi/xpp/mmapdrv.c
linux/trunk/drivers/dahdi/xpp/xbus-core.c
linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c
linux/trunk/drivers/dahdi/xpp/xdefs.h
linux/trunk/drivers/dahdi/xpp/xpp_usb.c
linux/trunk/drivers/dahdi/xpp/xproto.h
Modified: linux/trunk/drivers/dahdi/xpp/card_bri.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_bri.c?view=diff&rev=10435&r1=10434&r2=10435
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_bri.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_bri.c Thu Jan 12 11:12:48 2012
@@ -1611,12 +1611,18 @@
};
static xproto_table_t PROTO_TABLE(BRI) = {
- .owner = THIS_MODULE,.entries = {
+ .owner = THIS_MODULE,
+ .entries = {
/* Table Card Opcode */
- },.name = "BRI", /* protocol name */
-.ports_per_subunit = 1,.type = XPD_TYPE_BRI,.xops =
- &bri_xops,.phoneops = &bri_phoneops,.packet_is_valid =
- bri_packet_is_valid,.packet_dump = bri_packet_dump,};
+ },
+ .name = "BRI", /* protocol name */
+ .ports_per_subunit = 1,
+ .type = XPD_TYPE_BRI,
+ .xops = &bri_xops,
+ .phoneops = &bri_phoneops,
+ .packet_is_valid = bri_packet_is_valid,
+ .packet_dump = bri_packet_dump,
+};
static bool bri_packet_is_valid(xpacket_t *pack)
{
Modified: linux/trunk/drivers/dahdi/xpp/card_echo.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_echo.c?view=diff&rev=10435&r1=10434&r2=10435
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_echo.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_echo.c Thu Jan 12 11:12:48 2012
@@ -272,12 +272,19 @@
};
static xproto_table_t PROTO_TABLE(ECHO) = {
- .owner = THIS_MODULE,.entries = {
+ .owner = THIS_MODULE,
+ .entries = {
/* Table Card Opcode */
-XENTRY(ECHO, ECHO, SET_REPLY),},.name = "ECHO",.ports_per_subunit =
- 1,.type = XPD_TYPE_ECHO,.xops = &echo_xops,.echoops =
- &echoops,.packet_is_valid =
- echo_packet_is_valid,.packet_dump = echo_packet_dump,};
+ XENTRY( ECHO, ECHO, SET_REPLY ),
+ },
+ .name = "ECHO",
+ .ports_per_subunit = 1,
+ .type = XPD_TYPE_ECHO,
+ .xops = &echo_xops,
+ .echoops = &echoops,
+ .packet_is_valid = echo_packet_is_valid,
+ .packet_dump = echo_packet_dump,
+};
static bool echo_packet_is_valid(xpacket_t *pack)
{
Modified: linux/trunk/drivers/dahdi/xpp/card_fxo.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxo.c?view=diff&rev=10435&r1=10434&r2=10435
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxo.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxo.c Thu Jan 12 11:12:48 2012
@@ -1219,12 +1219,19 @@
};
static xproto_table_t PROTO_TABLE(FXO) = {
- .owner = THIS_MODULE,.entries = {
+ .owner = THIS_MODULE,
+ .entries = {
/* Prototable Card Opcode */
- XENTRY(FXO, FXO, SIG_CHANGED),},.name = "FXO", /* protocol name */
-.ports_per_subunit = 8,.type = XPD_TYPE_FXO,.xops =
- &fxo_xops,.phoneops = &fxo_phoneops,.packet_is_valid =
- fxo_packet_is_valid,.packet_dump = fxo_packet_dump,};
+ XENTRY( FXO, FXO, SIG_CHANGED ),
+ },
+ .name = "FXO", /* protocol name */
+ .ports_per_subunit = 8,
+ .type = XPD_TYPE_FXO,
+ .xops = &fxo_xops,
+ .phoneops = &fxo_phoneops,
+ .packet_is_valid = fxo_packet_is_valid,
+ .packet_dump = fxo_packet_dump,
+};
static bool fxo_packet_is_valid(xpacket_t *pack)
{
Modified: linux/trunk/drivers/dahdi/xpp/card_fxs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxs.c?view=diff&rev=10435&r1=10434&r2=10435
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxs.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxs.c Thu Jan 12 11:12:48 2012
@@ -1641,12 +1641,19 @@
};
static xproto_table_t PROTO_TABLE(FXS) = {
- .owner = THIS_MODULE,.entries = {
+ .owner = THIS_MODULE,
+ .entries = {
/* Prototable Card Opcode */
- XENTRY(FXS, FXS, SIG_CHANGED),},.name = "FXS", /* protocol name */
-.ports_per_subunit = 8,.type = XPD_TYPE_FXS,.xops =
- &fxs_xops,.phoneops = &fxs_phoneops,.packet_is_valid =
- fxs_packet_is_valid,.packet_dump = fxs_packet_dump,};
+ XENTRY( FXS, FXS, SIG_CHANGED ),
+ },
+ .name = "FXS", /* protocol name */
+ .ports_per_subunit = 8,
+ .type = XPD_TYPE_FXS,
+ .xops = &fxs_xops,
+ .phoneops = &fxs_phoneops,
+ .packet_is_valid = fxs_packet_is_valid,
+ .packet_dump = fxs_packet_dump,
+};
static bool fxs_packet_is_valid(xpacket_t *pack)
{
Modified: linux/trunk/drivers/dahdi/xpp/card_global.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_global.c?view=diff&rev=10435&r1=10434&r2=10435
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_global.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_global.c Thu Jan 12 11:12:48 2012
@@ -268,7 +268,7 @@
writing, /* writing */
regnum, do_subreg, /* use subreg */
subreg, /* subreg */
- data_low, do_datah, /* use data_high */
+ data_low, do_datah, /* use data_high */
data_high);
#endif
ret = xpp_register_request(xpd->xbus, xpd, portno,
@@ -627,14 +627,17 @@
xproto_table_t PROTO_TABLE(GLOBAL) = {
.entries = {
- /* Prototable Card Opcode */
-XENTRY(GLOBAL, GLOBAL, NULL_REPLY), XENTRY(GLOBAL, GLOBAL,
- AB_DESCRIPTION),
- XENTRY(GLOBAL, GLOBAL, SYNC_REPLY),
- XENTRY(GLOBAL, GLOBAL, ERROR_CODE),
- XENTRY(GLOBAL, GLOBAL, REGISTER_REPLY),},.name =
- "GLOBAL",.packet_is_valid =
- global_packet_is_valid,.packet_dump = global_packet_dump,};
+ /* Prototable Card Opcode */
+ XENTRY( GLOBAL, GLOBAL, NULL_REPLY ),
+ XENTRY( GLOBAL, GLOBAL, AB_DESCRIPTION ),
+ XENTRY( GLOBAL, GLOBAL, SYNC_REPLY ),
+ XENTRY( GLOBAL, GLOBAL, ERROR_CODE ),
+ XENTRY( GLOBAL, GLOBAL, REGISTER_REPLY ),
+ },
+ .name = "GLOBAL",
+ .packet_is_valid = global_packet_is_valid,
+ .packet_dump = global_packet_dump,
+};
static bool global_packet_is_valid(xpacket_t *pack)
{
Modified: linux/trunk/drivers/dahdi/xpp/card_pri.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_pri.c?view=diff&rev=10435&r1=10434&r2=10435
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_pri.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_pri.c Thu Jan 12 11:12:48 2012
@@ -2266,12 +2266,18 @@
};
static xproto_table_t PROTO_TABLE(PRI) = {
- .owner = THIS_MODULE,.entries = {
+ .owner = THIS_MODULE,
+ .entries = {
/* Table Card Opcode */
- },.name = "PRI", /* protocol name */
-.ports_per_subunit = 1,.type = XPD_TYPE_PRI,.xops =
- &pri_xops,.phoneops = &pri_phoneops,.packet_is_valid =
- pri_packet_is_valid,.packet_dump = pri_packet_dump,};
+ },
+ .name = "PRI", /* protocol name */
+ .ports_per_subunit = 1,
+ .type = XPD_TYPE_PRI,
+ .xops = &pri_xops,
+ .phoneops = &pri_phoneops,
+ .packet_is_valid = pri_packet_is_valid,
+ .packet_dump = pri_packet_dump,
+};
static bool pri_packet_is_valid(xpacket_t *pack)
{
Modified: linux/trunk/drivers/dahdi/xpp/mmapdrv.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/mmapdrv.c?view=diff&rev=10435&r1=10434&r2=10435
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/mmapdrv.c (original)
+++ linux/trunk/drivers/dahdi/xpp/mmapdrv.c Thu Jan 12 11:12:48 2012
@@ -465,11 +465,11 @@
*/
for (j = 0; j < 8; j++)
{
- if (__u8 &1)
+ if (__u8 & 1)
bfin_write_PORTGIO_SET(DATA);
else
bfin_write_PORTGIO_CLEAR(DATA);
- __u8 >>=1;
+ __u8 >>= 1;
bfin_write_PORTGIO_SET(DCLK);
bfin_write_PORTGIO_CLEAR(DCLK);
}
Modified: linux/trunk/drivers/dahdi/xpp/xbus-core.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-core.c?view=diff&rev=10435&r1=10434&r2=10435
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-core.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-core.c Thu Jan 12 11:12:48 2012
@@ -1813,7 +1813,8 @@
int val;
char hexdigit[3];
- while (*p && isspace(*p)) // skip whitespace
+ /* skip whitespace */
+ while (*p && isspace(*p))
p++;
if (!(*p))
break;
Modified: linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c?view=diff&rev=10435&r1=10434&r2=10435
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c Thu Jan 12 11:12:48 2012
@@ -291,20 +291,18 @@
static ssize_t \
field##_show(struct device *dev, struct device_attribute *attr, char *buf) \
{ \
- xbus_t *xbus; \
- \
- xbus = dev_to_xbus(dev); \
- return sprintf (buf, format_string, xbus->field); \
+ xbus_t *xbus; \
+ xbus = dev_to_xbus(dev); \
+ return sprintf(buf, format_string, xbus->field); \
}
#else
#define xbus_attr(field, format_string) \
static ssize_t \
field##_show(struct device *dev, char *buf) \
{ \
- xbus_t *xbus; \
- \
- xbus = dev_to_xbus(dev); \
- return sprintf (buf, format_string, xbus->field); \
+ xbus_t *xbus; \
+ xbus = dev_to_xbus(dev); \
+ return sprintf(buf, format_string, xbus->field); \
}
#endif
Modified: linux/trunk/drivers/dahdi/xpp/xdefs.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xdefs.h?view=diff&rev=10435&r1=10434&r2=10435
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xdefs.h (original)
+++ linux/trunk/drivers/dahdi/xpp/xdefs.h Thu Jan 12 11:12:48 2012
@@ -158,7 +158,7 @@
/* Also don't define this for later RHEL >= 5.2 . hex_asc is from the
* same linux-2.6-net-infrastructure-updates-to-mac80211-iwl4965.patch
* as is the bool typedef. */
-#if LINUX_VERSION_CODE != KERNEL_VERSION(2, 6, 18) || ! defined(hex_asc)
+#if LINUX_VERSION_CODE != KERNEL_VERSION(2, 6, 18) || !defined(hex_asc)
typedef int bool;
#endif
#endif
Modified: linux/trunk/drivers/dahdi/xpp/xpp_usb.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xpp_usb.c?view=diff&rev=10435&r1=10434&r2=10435
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xpp_usb.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xpp_usb.c Thu Jan 12 11:12:48 2012
@@ -510,20 +510,23 @@
struct xusb_endpoint out;
} model_table[] = {
[MODEL_FPGA_XPD] = {
- .iface_num = 0,.in = {
- .ep_addr = 0x86},.out = {
-.ep_addr = 0x02},.desc = "FPGA_XPD"},};
+ .iface_num = 0,
+ .in = { .ep_addr = 0x86 },
+ .out = { .ep_addr = 0x02 },
+ .desc = "FPGA_XPD"
+ },
+};
/* table of devices that work with this driver */
static const struct usb_device_id xusb_table[] = {
/* FPGA_FXS */ {USB_DEVICE(0xE4E4, 0x1132),
- .driver_info = (kernel_ulong_t) & model_table[MODEL_FPGA_XPD]},
+ .driver_info = (kernel_ulong_t)&model_table[MODEL_FPGA_XPD]},
/* FPGA_1141 */ {USB_DEVICE(0xE4E4, 0x1142),
- .driver_info = (kernel_ulong_t) & model_table[MODEL_FPGA_XPD]},
+ .driver_info = (kernel_ulong_t)&model_table[MODEL_FPGA_XPD]},
/* FPGA_1151 */ {USB_DEVICE(0xE4E4, 0x1152),
- .driver_info = (kernel_ulong_t) & model_table[MODEL_FPGA_XPD]},
+ .driver_info = (kernel_ulong_t)&model_table[MODEL_FPGA_XPD]},
/* FPGA_1161 */ {USB_DEVICE(0xE4E4, 0x1162),
- .driver_info = (kernel_ulong_t) & model_table[MODEL_FPGA_XPD]},
+ .driver_info = (kernel_ulong_t)&model_table[MODEL_FPGA_XPD]},
/* Terminate */ {}
};
@@ -640,7 +643,7 @@
ep_addr, endpoint->bmAttributes);
continue;
}
- if (usb_pipein(ep_addr)) { // Input
+ if (usb_pipein(ep_addr)) { /* Input */
if (ep_addr == model_info->in.ep_addr) {
if (!check_usb1(endpoint))
return 0;
@@ -649,7 +652,7 @@
xusb_ep->max_size = endpoint->wMaxPacketSize;
xusb_ep->callback = xpp_receive_callback;
}
- } else { // Output
+ } else { /* Output */
if (ep_addr == model_info->out.ep_addr) {
if (!check_usb1(endpoint))
return 0;
@@ -832,7 +835,7 @@
ERR("Failed to initialize xpp usb bus: %d\n", retval);
usb_set_intfdata(interface, NULL);
if (xusb) {
- if (xusb->minor) { // passed registration phase
+ if (xusb->minor) { /* passed registration phase */
ERR("Calling usb_deregister_dev()\n");
usb_deregister_dev(interface, &xusb_class);
}
Modified: linux/trunk/drivers/dahdi/xpp/xproto.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xproto.h?view=diff&rev=10435&r1=10434&r2=10435
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xproto.h (original)
+++ linux/trunk/drivers/dahdi/xpp/xproto.h Thu Jan 12 11:12:48 2012
@@ -85,7 +85,7 @@
#define XPD_TYPE_PREFIX "xpd-type-"
-#define MODULE_ALIAS_XPD(type) \
+#define MODULE_ALIAS_XPD(type) \
MODULE_ALIAS(XPD_TYPE_PREFIX __stringify(type))
#define PCM_CHUNKSIZE (CHANNELS_PERXPD * 8) /* samples of 8 bytes */
@@ -96,26 +96,26 @@
#define XPROTO_HANDLER(card, op) XPROTO_NAME(card, op ## _handler)
#define XPROTO_CALLER(card, op) XPROTO_NAME(card, op ## _send)
-#define HANDLER_DEF(card, op) \
+#define HANDLER_DEF(card, op) \
static int XPROTO_HANDLER(card, op) ( \
xbus_t *xbus, \
xpd_t *xpd, \
const xproto_entry_t *cmd, \
xpacket_t *pack)
-#define CALL_PROTO(card, op, ...) XPROTO_CALLER(card, op)( __VA_ARGS__ )
-
-#define DECLARE_CMD(card, op, ...) \
- int CALL_PROTO(card, op, xbus_t *xbus, xpd_t *xpd, ## __VA_ARGS__ )
-
-#define HOSTCMD(card, op, ...) \
- DECLARE_CMD(card, op, ## __VA_ARGS__ )
+#define CALL_PROTO(card, op, ...) XPROTO_CALLER(card, op)(__VA_ARGS__)
+
+#define DECLARE_CMD(card, op, ...) \
+ int CALL_PROTO(card, op, xbus_t *xbus, xpd_t *xpd, ## __VA_ARGS__)
+
+#define HOSTCMD(card, op, ...) \
+ DECLARE_CMD(card, op, ## __VA_ARGS__)
#define RPACKET_NAME(card, op) XPROTO_NAME(RPACKET_ ## card, op)
#define RPACKET_TYPE(card, op) struct RPACKET_NAME(card, op)
-#define DEF_RPACKET_DATA(card, op, ...) \
- RPACKET_TYPE(card, op) { \
+#define DEF_RPACKET_DATA(card, op, ...) \
+ RPACKET_TYPE(card, op) { \
struct xpacket_header head; \
__VA_ARGS__ \
} PACKED
@@ -124,7 +124,7 @@
(((RPACKET_TYPE(card, op) *)(p))->field)
#define RPACKET_SIZE(card, op) sizeof(RPACKET_TYPE(card, op))
-#define XENTRY(prototab, module, op) \
+#define XENTRY(prototab, module, op) \
[ XPROTO_NAME(module, op) ] = { \
.handler = XPROTO_HANDLER(module, op), \
.datalen = RPACKET_SIZE(module, op), \
@@ -132,7 +132,7 @@
.table = &PROTO_TABLE(prototab) \
}
-#define XPACKET_INIT(p, card, op, to, pcm, pcmslot) \
+#define XPACKET_INIT(p, card, op, to, pcm, pcmslot) \
do { \
XPACKET_OP(p) = XPROTO_NAME(card, op); \
XPACKET_LEN(p) = RPACKET_SIZE(card, op); \
@@ -145,9 +145,9 @@
XPACKET_ADDR_RESERVED(p) = 0; \
} while (0)
-#define XFRAME_NEW_CMD(frm, p, xbus, card, op, to) \
+#define XFRAME_NEW_CMD(frm, p, xbus, card, op, to) \
do { \
- int pack_len = RPACKET_SIZE(card, op); \
+ int pack_len = RPACKET_SIZE(card, op); \
\
if (!XBUS_FLAGS(xbus, CONNECTED)) \
return -ENODEV; \
@@ -219,16 +219,16 @@
* CALL_XMETHOD() calls the method, passing mandatory arguments
*/
#define XMETHOD(name, xpd) ((xpd)->xops->name)
-#define CALL_XMETHOD(name, xpd, ...) \
- (XMETHOD(name, (xpd))((xpd)->xbus, (xpd), ## __VA_ARGS__ ))
+#define CALL_XMETHOD(name, xpd, ...) \
+ (XMETHOD(name, (xpd))((xpd)->xbus, (xpd), ## __VA_ARGS__))
/*
* PHONE_METHOD() resolve to method pointer (NULL for optional methods)
* CALL_PHONE_METHOD() calls the method, passing mandatory arguments
*/
#define PHONE_METHOD(name, xpd) (PHONEDEV(xpd).phoneops->name)
-#define CALL_PHONE_METHOD(name, xpd, ...) \
- (PHONE_METHOD(name, (xpd))((xpd), ## __VA_ARGS__ ))
+#define CALL_PHONE_METHOD(name, xpd, ...) \
+ (PHONE_METHOD(name, (xpd))((xpd), ## __VA_ARGS__))
struct phoneops {
void (*card_pcm_recompute) (xpd_t *xpd, xpp_line_t pcm_mask);
More information about the svn-commits
mailing list