提交 e53fcabc 编写于 作者: B Benjamin Herrenschmidt 提交者: Linus Torvalds

[PATCH] aoa: pmf gpio: report if function calling fails

This patch makes the pmf GPIO layer in aoa report if calling a platform
function failed.
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 977c6023
......@@ -14,9 +14,13 @@
static void pmf_gpio_set_##name(struct gpio_runtime *rt, int on)\
{ \
struct pmf_args args = { .count = 1, .u[0].v = !on }; \
\
int rc; \
\
if (unlikely(!rt)) return; \
pmf_call_function(rt->node, #name "-mute", &args); \
rc = pmf_call_function(rt->node, #name "-mute", &args); \
if (rc) \
printk(KERN_WARNING "pmf_gpio_set_" #name \
" failed, rc: %d\n", rc); \
rt->implementation_private &= ~(1<<bit); \
rt->implementation_private |= (!!on << bit); \
} \
......@@ -33,9 +37,13 @@ PMF_GPIO(lineout, 2);
static void pmf_gpio_set_hw_reset(struct gpio_runtime *rt, int on)
{
struct pmf_args args = { .count = 1, .u[0].v = !!on };
int rc;
if (unlikely(!rt)) return;
pmf_call_function(rt->node, "hw-reset", &args);
rc = pmf_call_function(rt->node, "hw-reset", &args);
if (rc)
printk(KERN_WARNING "pmf_gpio_set_hw_reset"
" failed, rc: %d\n", rc);
}
static void pmf_gpio_all_amps_off(struct gpio_runtime *rt)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册