summaryrefslogtreecommitdiffstats
path: root/firmware/export/mc13783.h
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-13 15:47:26 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-13 15:48:31 -0400
commit431caa4311c13a0937ae60ac225e780c0a0670b9 (patch)
tree319db80e0ce77663b70d04391ee81ccae2012c0b /firmware/export/mc13783.h
parentf8bd54d5759c78d0777f25cad287a6dbeb0b45ea (diff)
downloadrockbox-431caa4311.tar.gz
rockbox-431caa4311.zip
imx31: Work around an apparently not-quite-kosher abuse of CPP
(we were trying to foward-declare functions from within static initializer context. GCC no longer accepts this) Change-Id: I58f316ecc84c8ab45fffc054955727a55714b0a3
Diffstat (limited to 'firmware/export/mc13783.h')
-rw-r--r--firmware/export/mc13783.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/export/mc13783.h b/firmware/export/mc13783.h
index d427830786..83edd31904 100644
--- a/firmware/export/mc13783.h
+++ b/firmware/export/mc13783.h
@@ -1067,7 +1067,7 @@ enum mc13783_regs_enum
#define MC13783_ICHRG_1064MA (0xc << 3) /* 967 1064 1170 */
#define MC13783_ICHRG_1152MA (0xd << 3) /* 1048 1152 1268 */
#define MC13783_ICHRG_1596MA (0xe << 3) /* 1450 1596 1755 */
- #define MC13783_ICHRG_FULLY_ON (0xf << 3) /* Disallow HW FET turn on */
+ #define MC13783_ICHRG_FULLY_ON (0xf << 3) /* Disallow HW FET turn on */
#define MC13783_ICHRGTR (0x7 << 7) /* Min Nom Max */
#define MC13783_ICHRGTR_POS (7)
#define MC13783_ICHRGTR_0MA (0x0 << 7) /* 0 0 0 */
@@ -1340,11 +1340,12 @@ struct mc13783_event
{ \
static const struct mc13783_event __tbl[] = {
+#define MC13783_EVENT_VECTOR_CB(__name) void MC13783_EVENT_CB_##__name(void)
+
#define MC13783_EVENT_VECTOR(__name, __sense) \
{ .id = MC13783_INT_ID_##__name, \
.sense = (__sense), \
- .callback = ({ void MC13783_EVENT_CB_##__name(void); \
- MC13783_EVENT_CB_##__name; }) },
+ .callback = (MC13783_EVENT_CB_##__name) },
#define MC13783_EVENT_VECTOR_TBL_END() \
}; \