diff options
author | Karsten Keil <keil@b1-systems.de> | 2009-07-24 12:26:08 -0400 |
---|---|---|
committer | Karsten Keil <keil@b1-systems.de> | 2009-07-25 14:23:05 -0400 |
commit | ba2d6ccb1df6ebb2c1b2322518ce7be25c1e3469 (patch) | |
tree | 1c454520cbef80d0fdc314104766d2ff0ccd0212 /drivers/isdn/hisax/isdnl1.c | |
parent | 3cad3da3ed9ece03704f7d67e038b8ae710fa312 (diff) |
ISDN: ARRAY_SIZE changes
These changes were a direct result of using a semantic patch
More information can be found at http://www.emn.fr/x-info/coccinelle/
Modified some of the changes to avoid the extra define.
Signed-off-by: Stoyan Gaydarov <sgayda2@uiuc.edu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Diffstat (limited to 'drivers/isdn/hisax/isdnl1.c')
-rw-r--r-- | drivers/isdn/hisax/isdnl1.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/isdn/hisax/isdnl1.c b/drivers/isdn/hisax/isdnl1.c index 317f16f516f2..9ce6abe05b1a 100644 --- a/drivers/isdn/hisax/isdnl1.c +++ b/drivers/isdn/hisax/isdnl1.c | |||
@@ -647,8 +647,6 @@ static struct FsmNode L1SFnList[] __initdata = | |||
647 | {ST_L1_F8, EV_TIMER_DEACT, l1_timer_deact}, | 647 | {ST_L1_F8, EV_TIMER_DEACT, l1_timer_deact}, |
648 | }; | 648 | }; |
649 | 649 | ||
650 | #define L1S_FN_COUNT (sizeof(L1SFnList)/sizeof(struct FsmNode)) | ||
651 | |||
652 | #ifdef HISAX_UINTERFACE | 650 | #ifdef HISAX_UINTERFACE |
653 | static void | 651 | static void |
654 | l1_deact_req_u(struct FsmInst *fi, int event, void *arg) | 652 | l1_deact_req_u(struct FsmInst *fi, int event, void *arg) |
@@ -706,8 +704,6 @@ static struct FsmNode L1UFnList[] __initdata = | |||
706 | {ST_L1_RESET, EV_TIMER_DEACT, l1_timer_deact}, | 704 | {ST_L1_RESET, EV_TIMER_DEACT, l1_timer_deact}, |
707 | }; | 705 | }; |
708 | 706 | ||
709 | #define L1U_FN_COUNT (sizeof(L1UFnList)/sizeof(struct FsmNode)) | ||
710 | |||
711 | #endif | 707 | #endif |
712 | 708 | ||
713 | static void | 709 | static void |
@@ -754,8 +750,6 @@ static struct FsmNode L1BFnList[] __initdata = | |||
754 | {ST_L1_WAIT_DEACT, EV_TIMER_DEACT, l1b_timer_deact}, | 750 | {ST_L1_WAIT_DEACT, EV_TIMER_DEACT, l1b_timer_deact}, |
755 | }; | 751 | }; |
756 | 752 | ||
757 | #define L1B_FN_COUNT (sizeof(L1BFnList)/sizeof(struct FsmNode)) | ||
758 | |||
759 | int __init | 753 | int __init |
760 | Isdnl1New(void) | 754 | Isdnl1New(void) |
761 | { | 755 | { |
@@ -765,7 +759,7 @@ Isdnl1New(void) | |||
765 | l1fsm_s.event_count = L1_EVENT_COUNT; | 759 | l1fsm_s.event_count = L1_EVENT_COUNT; |
766 | l1fsm_s.strEvent = strL1Event; | 760 | l1fsm_s.strEvent = strL1Event; |
767 | l1fsm_s.strState = strL1SState; | 761 | l1fsm_s.strState = strL1SState; |
768 | retval = FsmNew(&l1fsm_s, L1SFnList, L1S_FN_COUNT); | 762 | retval = FsmNew(&l1fsm_s, L1SFnList, ARRAY_SIZE(L1SFnList)); |
769 | if (retval) | 763 | if (retval) |
770 | return retval; | 764 | return retval; |
771 | 765 | ||
@@ -773,7 +767,7 @@ Isdnl1New(void) | |||
773 | l1fsm_b.event_count = L1_EVENT_COUNT; | 767 | l1fsm_b.event_count = L1_EVENT_COUNT; |
774 | l1fsm_b.strEvent = strL1Event; | 768 | l1fsm_b.strEvent = strL1Event; |
775 | l1fsm_b.strState = strL1BState; | 769 | l1fsm_b.strState = strL1BState; |
776 | retval = FsmNew(&l1fsm_b, L1BFnList, L1B_FN_COUNT); | 770 | retval = FsmNew(&l1fsm_b, L1BFnList, ARRAY_SIZE(L1BFnList)); |
777 | if (retval) { | 771 | if (retval) { |
778 | FsmFree(&l1fsm_s); | 772 | FsmFree(&l1fsm_s); |
779 | return retval; | 773 | return retval; |
@@ -783,7 +777,7 @@ Isdnl1New(void) | |||
783 | l1fsm_u.event_count = L1_EVENT_COUNT; | 777 | l1fsm_u.event_count = L1_EVENT_COUNT; |
784 | l1fsm_u.strEvent = strL1Event; | 778 | l1fsm_u.strEvent = strL1Event; |
785 | l1fsm_u.strState = strL1UState; | 779 | l1fsm_u.strState = strL1UState; |
786 | retval = FsmNew(&l1fsm_u, L1UFnList, L1U_FN_COUNT); | 780 | retval = FsmNew(&l1fsm_u, L1UFnList, ARRAY_SIZE(L1UFnList)); |
787 | if (retval) { | 781 | if (retval) { |
788 | FsmFree(&l1fsm_s); | 782 | FsmFree(&l1fsm_s); |
789 | FsmFree(&l1fsm_b); | 783 | FsmFree(&l1fsm_b); |