xpp: style - manual whitespace/line-breaks cleanup

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@10435 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Oron Peled 2012-01-12 17:12:48 +00:00 committed by Tzafrir Cohen
parent 0244106553
commit a28ffb3af5
12 changed files with 111 additions and 73 deletions

View File

@ -1611,12 +1611,18 @@ static const struct phoneops bri_phoneops = {
}; };
static xproto_table_t PROTO_TABLE(BRI) = { static xproto_table_t PROTO_TABLE(BRI) = {
.owner = THIS_MODULE,.entries = { .owner = THIS_MODULE,
.entries = {
/* Table Card Opcode */ /* Table Card Opcode */
},.name = "BRI", /* protocol name */ },
.ports_per_subunit = 1,.type = XPD_TYPE_BRI,.xops = .name = "BRI", /* protocol name */
&bri_xops,.phoneops = &bri_phoneops,.packet_is_valid = .ports_per_subunit = 1,
bri_packet_is_valid,.packet_dump = bri_packet_dump,}; .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) static bool bri_packet_is_valid(xpacket_t *pack)
{ {

View File

@ -272,12 +272,19 @@ static const struct echoops echoops = {
}; };
static xproto_table_t PROTO_TABLE(ECHO) = { static xproto_table_t PROTO_TABLE(ECHO) = {
.owner = THIS_MODULE,.entries = { .owner = THIS_MODULE,
.entries = {
/* Table Card Opcode */ /* Table Card Opcode */
XENTRY(ECHO, ECHO, SET_REPLY),},.name = "ECHO",.ports_per_subunit = XENTRY( ECHO, ECHO, SET_REPLY ),
1,.type = XPD_TYPE_ECHO,.xops = &echo_xops,.echoops = },
&echoops,.packet_is_valid = .name = "ECHO",
echo_packet_is_valid,.packet_dump = echo_packet_dump,}; .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) static bool echo_packet_is_valid(xpacket_t *pack)
{ {

View File

@ -1219,12 +1219,19 @@ static const struct phoneops fxo_phoneops = {
}; };
static xproto_table_t PROTO_TABLE(FXO) = { static xproto_table_t PROTO_TABLE(FXO) = {
.owner = THIS_MODULE,.entries = { .owner = THIS_MODULE,
.entries = {
/* Prototable Card Opcode */ /* Prototable Card Opcode */
XENTRY(FXO, FXO, SIG_CHANGED),},.name = "FXO", /* protocol name */ XENTRY( FXO, FXO, SIG_CHANGED ),
.ports_per_subunit = 8,.type = XPD_TYPE_FXO,.xops = },
&fxo_xops,.phoneops = &fxo_phoneops,.packet_is_valid = .name = "FXO", /* protocol name */
fxo_packet_is_valid,.packet_dump = fxo_packet_dump,}; .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) static bool fxo_packet_is_valid(xpacket_t *pack)
{ {

View File

@ -1641,12 +1641,19 @@ static const struct phoneops fxs_phoneops = {
}; };
static xproto_table_t PROTO_TABLE(FXS) = { static xproto_table_t PROTO_TABLE(FXS) = {
.owner = THIS_MODULE,.entries = { .owner = THIS_MODULE,
.entries = {
/* Prototable Card Opcode */ /* Prototable Card Opcode */
XENTRY(FXS, FXS, SIG_CHANGED),},.name = "FXS", /* protocol name */ XENTRY( FXS, FXS, SIG_CHANGED ),
.ports_per_subunit = 8,.type = XPD_TYPE_FXS,.xops = },
&fxs_xops,.phoneops = &fxs_phoneops,.packet_is_valid = .name = "FXS", /* protocol name */
fxs_packet_is_valid,.packet_dump = fxs_packet_dump,}; .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) static bool fxs_packet_is_valid(xpacket_t *pack)
{ {

View File

@ -628,13 +628,16 @@ HANDLER_DEF(GLOBAL, ERROR_CODE)
xproto_table_t PROTO_TABLE(GLOBAL) = { xproto_table_t PROTO_TABLE(GLOBAL) = {
.entries = { .entries = {
/* Prototable Card Opcode */ /* Prototable Card Opcode */
XENTRY(GLOBAL, GLOBAL, NULL_REPLY), XENTRY(GLOBAL, GLOBAL, XENTRY( GLOBAL, GLOBAL, NULL_REPLY ),
AB_DESCRIPTION), XENTRY( GLOBAL, GLOBAL, AB_DESCRIPTION ),
XENTRY( GLOBAL, GLOBAL, SYNC_REPLY ), XENTRY( GLOBAL, GLOBAL, SYNC_REPLY ),
XENTRY( GLOBAL, GLOBAL, ERROR_CODE ), XENTRY( GLOBAL, GLOBAL, ERROR_CODE ),
XENTRY(GLOBAL, GLOBAL, REGISTER_REPLY),},.name = XENTRY( GLOBAL, GLOBAL, REGISTER_REPLY ),
"GLOBAL",.packet_is_valid = },
global_packet_is_valid,.packet_dump = global_packet_dump,}; .name = "GLOBAL",
.packet_is_valid = global_packet_is_valid,
.packet_dump = global_packet_dump,
};
static bool global_packet_is_valid(xpacket_t *pack) static bool global_packet_is_valid(xpacket_t *pack)
{ {

View File

@ -2266,12 +2266,18 @@ static const struct phoneops pri_phoneops = {
}; };
static xproto_table_t PROTO_TABLE(PRI) = { static xproto_table_t PROTO_TABLE(PRI) = {
.owner = THIS_MODULE,.entries = { .owner = THIS_MODULE,
.entries = {
/* Table Card Opcode */ /* Table Card Opcode */
},.name = "PRI", /* protocol name */ },
.ports_per_subunit = 1,.type = XPD_TYPE_PRI,.xops = .name = "PRI", /* protocol name */
&pri_xops,.phoneops = &pri_phoneops,.packet_is_valid = .ports_per_subunit = 1,
pri_packet_is_valid,.packet_dump = pri_packet_dump,}; .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) static bool pri_packet_is_valid(xpacket_t *pack)
{ {

View File

@ -1813,7 +1813,8 @@ static int proc_xbus_command_write(struct file *file,
int val; int val;
char hexdigit[3]; char hexdigit[3];
while (*p && isspace(*p)) // skip whitespace /* skip whitespace */
while (*p && isspace(*p))
p++; p++;
if (!(*p)) if (!(*p))
break; break;

View File

@ -292,7 +292,6 @@ static ssize_t \
field##_show(struct device *dev, struct device_attribute *attr, char *buf) \ field##_show(struct device *dev, struct device_attribute *attr, char *buf) \
{ \ { \
xbus_t *xbus; \ xbus_t *xbus; \
\
xbus = dev_to_xbus(dev); \ xbus = dev_to_xbus(dev); \
return sprintf(buf, format_string, xbus->field); \ return sprintf(buf, format_string, xbus->field); \
} }
@ -302,7 +301,6 @@ static ssize_t \
field##_show(struct device *dev, char *buf) \ field##_show(struct device *dev, char *buf) \
{ \ { \
xbus_t *xbus; \ xbus_t *xbus; \
\
xbus = dev_to_xbus(dev); \ xbus = dev_to_xbus(dev); \
return sprintf(buf, format_string, xbus->field); \ return sprintf(buf, format_string, xbus->field); \
} }

View File

@ -510,9 +510,12 @@ static const struct xusb_model_info {
struct xusb_endpoint out; struct xusb_endpoint out;
} model_table[] = { } model_table[] = {
[MODEL_FPGA_XPD] = { [MODEL_FPGA_XPD] = {
.iface_num = 0,.in = { .iface_num = 0,
.ep_addr = 0x86},.out = { .in = { .ep_addr = 0x86 },
.ep_addr = 0x02},.desc = "FPGA_XPD"},}; .out = { .ep_addr = 0x02 },
.desc = "FPGA_XPD"
},
};
/* table of devices that work with this driver */ /* table of devices that work with this driver */
static const struct usb_device_id xusb_table[] = { static const struct usb_device_id xusb_table[] = {
@ -640,7 +643,7 @@ static int set_endpoints(xusb_t *xusb, struct usb_host_interface *iface_desc,
ep_addr, endpoint->bmAttributes); ep_addr, endpoint->bmAttributes);
continue; continue;
} }
if (usb_pipein(ep_addr)) { // Input if (usb_pipein(ep_addr)) { /* Input */
if (ep_addr == model_info->in.ep_addr) { if (ep_addr == model_info->in.ep_addr) {
if (!check_usb1(endpoint)) if (!check_usb1(endpoint))
return 0; return 0;
@ -649,7 +652,7 @@ static int set_endpoints(xusb_t *xusb, struct usb_host_interface *iface_desc,
xusb_ep->max_size = endpoint->wMaxPacketSize; xusb_ep->max_size = endpoint->wMaxPacketSize;
xusb_ep->callback = xpp_receive_callback; xusb_ep->callback = xpp_receive_callback;
} }
} else { // Output } else { /* Output */
if (ep_addr == model_info->out.ep_addr) { if (ep_addr == model_info->out.ep_addr) {
if (!check_usb1(endpoint)) if (!check_usb1(endpoint))
return 0; return 0;
@ -832,7 +835,7 @@ probe_failed:
ERR("Failed to initialize xpp usb bus: %d\n", retval); ERR("Failed to initialize xpp usb bus: %d\n", retval);
usb_set_intfdata(interface, NULL); usb_set_intfdata(interface, NULL);
if (xusb) { if (xusb) {
if (xusb->minor) { // passed registration phase if (xusb->minor) { /* passed registration phase */
ERR("Calling usb_deregister_dev()\n"); ERR("Calling usb_deregister_dev()\n");
usb_deregister_dev(interface, &xusb_class); usb_deregister_dev(interface, &xusb_class);
} }