diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-28 12:55:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-28 12:55:53 -0400 |
commit | 5af634789c93b97cfb314a102436716be8fbc577 (patch) | |
tree | 17653cb8bffd2f72d20f046b852f11dcd012c7e9 | |
parent | eebfc6055aba312f8b620a58fe1c23471cdcd149 (diff) |
Staging: brcm80211: fix usage of roundup in structures
Now that the roundup macro is sane, it can't be used in structure
definitions, or the build breaks.. For now, create a "broken_roundup()"
macro to get everything building again, but in the end, fixing these
structures to use a proper size value is the correct thing to do.
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_event.c | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_key.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/brcm80211/sys/wlc_event.c b/drivers/staging/brcm80211/sys/wlc_event.c index 7c17e5f67c5f..7e1bf0e2ecdd 100644 --- a/drivers/staging/brcm80211/sys/wlc_event.c +++ b/drivers/staging/brcm80211/sys/wlc_event.c | |||
@@ -47,7 +47,7 @@ struct wlc_eventq { | |||
47 | bool workpending; | 47 | bool workpending; |
48 | struct wl_timer *timer; | 48 | struct wl_timer *timer; |
49 | wlc_eventq_cb_t cb; | 49 | wlc_eventq_cb_t cb; |
50 | u8 event_inds_mask[roundup(WLC_E_LAST, NBBY) / NBBY]; | 50 | u8 event_inds_mask[broken_roundup(WLC_E_LAST, NBBY) / NBBY]; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | /* | 53 | /* |
diff --git a/drivers/staging/brcm80211/sys/wlc_key.h b/drivers/staging/brcm80211/sys/wlc_key.h index d4f1b91f4dee..6678c69f1e1c 100644 --- a/drivers/staging/brcm80211/sys/wlc_key.h +++ b/drivers/staging/brcm80211/sys/wlc_key.h | |||
@@ -105,8 +105,9 @@ typedef struct wsec_key { | |||
105 | 105 | ||
106 | } wsec_key_t; | 106 | } wsec_key_t; |
107 | 107 | ||
108 | #define broken_roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) | ||
108 | typedef struct { | 109 | typedef struct { |
109 | u8 vec[roundup(WSEC_MAX_KEYS, NBBY) / NBBY]; /* bitvec of wsec_key indexes */ | 110 | u8 vec[broken_roundup(WSEC_MAX_KEYS, NBBY) / NBBY]; /* bitvec of wsec_key indexes */ |
110 | } wsec_key_vec_t; | 111 | } wsec_key_vec_t; |
111 | 112 | ||
112 | /* For use with wsec_key_t.flags */ | 113 | /* For use with wsec_key_t.flags */ |