diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2012-01-11 17:04:36 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2012-01-11 17:04:36 +0000 |
commit | 255867a2f3ef00bb35d221be49ae55ef68b035c7 (patch) | |
tree | 4d7d125a30d8957343269ecaf0c7f07d4b3043b4 /drivers/dahdi/xpp/card_global.c | |
parent | dc228a61f57f12f036ae8b993aa3dc286493de67 (diff) |
xpp: fix "non-const" index, right header, indent
Synchronize some changes from out internal tree:
* Fix a few of the places where indent did a lousy job.
* sparse did not like using the const MAX_ARGS as an index. Make it a define.
* Incorrect header included in card_fxs.c (doh!).
* One more funciton to statify.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10429 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/card_global.c')
-rw-r--r-- | drivers/dahdi/xpp/card_global.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/dahdi/xpp/card_global.c b/drivers/dahdi/xpp/card_global.c index 8918e5c..8feb00a 100644 --- a/drivers/dahdi/xpp/card_global.c +++ b/drivers/dahdi/xpp/card_global.c @@ -258,21 +258,26 @@ static int execute_chip_command(xpd_t *xpd, const int argc, char *argv[]) goto out; } #if 0 - XPD_DBG(REGS, xpd, "portno=%d writing=%d regnum=%d do_subreg=%d subreg=%d dataL=%d do_datah=%d dataH=%d\n", portno, /* portno */ - writing, /* writing */ - regnum, do_subreg, /* use subreg */ - subreg, /* subreg */ - data_low, do_datah, /* use data_high */ + XPD_DBG(REGS, xpd, + "portno=%d writing=%d regnum=%d do_subreg=%d subreg=%d dataL=%d do_datah=%d dataH=%d\n", + portno, /* portno */ + writing, /* writing */ + regnum, + do_subreg, /* use subreg */ + subreg, /* subreg */ + data_low, + do_datah, /* use data_high*/ data_high); #endif - ret = - xpp_register_request(xpd->xbus, xpd, portno, writing, regnum, - do_subreg, subreg, data_low, do_datah, - data_high, 1); + ret = xpp_register_request(xpd->xbus, xpd, portno, + writing, regnum, do_subreg, subreg, + data_low, do_datah, data_high, 1); out: return ret; } +#define MAX_ARGS 10 + int parse_chip_command(xpd_t *xpd, char *cmdline) { xbus_t *xbus; @@ -280,7 +285,6 @@ int parse_chip_command(xpd_t *xpd, char *cmdline) __u8 buf[MAX_PROC_WRITE]; char *str; char *p; - static const int MAX_ARGS = 10; char *argv[MAX_ARGS + 1]; int argc; int i; |