From 0cd7f3420190b589292a576bd5cc96a2078fd755 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 29 Mar 2012 15:25:23 +0000 Subject: [PATCH] wctdm24xxp: Remove forward declaration of inline for GCC 3.4.4 GCC 3.4.4 does not allow forward declaration of inline functions. Internal-Issue-ID: DAHLIN-286 Reported-by: Guenther Kelleter Patches: wctdm24xxp-inline.patch uploaded by Guenther Kelleter (License #6372) Signed-off-by: Shaun Ruffell git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10613 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wctdm24xxp/base.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index 1d883bd..e1d6799 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -1073,9 +1073,22 @@ wctdm_isr_getreg(struct wctdm *wc, struct wctdm_module *const mod, u8 address) list_add(&cmd->node, &mod->pending_cmds); } +/* Must be called with wc.reglock held and local interrupts disabled */ static inline void -wctdm_setreg_intr(struct wctdm *wc, struct wctdm_module *mod, - int addr, int val); +wctdm_setreg_intr(struct wctdm *wc, struct wctdm_module *mod, int addr, int val) +{ + struct wctdm_cmd *cmd; + + cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC); + if (unlikely(!cmd)) + return; + + cmd->complete = NULL; + cmd->cmd = CMD_WR(addr, val); + + list_add_tail(&cmd->node, &mod->pending_cmds); +} + static void cmd_checkisr(struct wctdm *wc, struct wctdm_module *const mod) { @@ -1220,22 +1233,6 @@ static inline void wctdm_transmitprep(struct wctdm *wc, unsigned char *sframe) spin_unlock(&wc->reglock); } -/* Must be called with wc.reglock held and local interrupts disabled */ -static inline void -wctdm_setreg_intr(struct wctdm *wc, struct wctdm_module *mod, int addr, int val) -{ - struct wctdm_cmd *cmd; - - cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC); - if (unlikely(!cmd)) - return; - - cmd->complete = NULL; - cmd->cmd = CMD_WR(addr, val); - - list_add_tail(&cmd->node, &mod->pending_cmds); -} - int wctdm_setreg(struct wctdm *wc, struct wctdm_module *mod, int addr, int val) { struct wctdm_cmd *cmd;