Commit 1fda39e6 authored by Roel Kluin's avatar Roel Kluin Committed by paul

OMAP2/3 powerdomain: return errors rather than returning the output of IS_ERR()

IS_ERR returns only 1 or 0, and the functions return a negative error
in other cases anyways.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
parent 155a22ec
...@@ -478,7 +478,7 @@ int pwrdm_add_wkdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2) ...@@ -478,7 +478,7 @@ int pwrdm_add_wkdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
if (IS_ERR(p)) { if (IS_ERR(p)) {
pr_debug("powerdomain: hardware cannot set/clear wake up of " pr_debug("powerdomain: hardware cannot set/clear wake up of "
"%s when %s wakes up\n", pwrdm1->name, pwrdm2->name); "%s when %s wakes up\n", pwrdm1->name, pwrdm2->name);
return IS_ERR(p); return PTR_ERR(p);
} }
pr_debug("powerdomain: hardware will wake up %s when %s wakes up\n", pr_debug("powerdomain: hardware will wake up %s when %s wakes up\n",
...@@ -511,7 +511,7 @@ int pwrdm_del_wkdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2) ...@@ -511,7 +511,7 @@ int pwrdm_del_wkdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
if (IS_ERR(p)) { if (IS_ERR(p)) {
pr_debug("powerdomain: hardware cannot set/clear wake up of " pr_debug("powerdomain: hardware cannot set/clear wake up of "
"%s when %s wakes up\n", pwrdm1->name, pwrdm2->name); "%s when %s wakes up\n", pwrdm1->name, pwrdm2->name);
return IS_ERR(p); return PTR_ERR(p);
} }
pr_debug("powerdomain: hardware will no longer wake up %s after %s " pr_debug("powerdomain: hardware will no longer wake up %s after %s "
...@@ -548,7 +548,7 @@ int pwrdm_read_wkdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2) ...@@ -548,7 +548,7 @@ int pwrdm_read_wkdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
if (IS_ERR(p)) { if (IS_ERR(p)) {
pr_debug("powerdomain: hardware cannot set/clear wake up of " pr_debug("powerdomain: hardware cannot set/clear wake up of "
"%s when %s wakes up\n", pwrdm1->name, pwrdm2->name); "%s when %s wakes up\n", pwrdm1->name, pwrdm2->name);
return IS_ERR(p); return PTR_ERR(p);
} }
return prm_read_mod_bits_shift(pwrdm1->prcm_offs, PM_WKDEP, return prm_read_mod_bits_shift(pwrdm1->prcm_offs, PM_WKDEP,
...@@ -582,7 +582,7 @@ int pwrdm_add_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2) ...@@ -582,7 +582,7 @@ int pwrdm_add_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
pr_debug("powerdomain: hardware cannot set/clear sleep " pr_debug("powerdomain: hardware cannot set/clear sleep "
"dependency affecting %s from %s\n", pwrdm1->name, "dependency affecting %s from %s\n", pwrdm1->name,
pwrdm2->name); pwrdm2->name);
return IS_ERR(p); return PTR_ERR(p);
} }
pr_debug("powerdomain: will prevent %s from sleeping if %s is active\n", pr_debug("powerdomain: will prevent %s from sleeping if %s is active\n",
...@@ -621,7 +621,7 @@ int pwrdm_del_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2) ...@@ -621,7 +621,7 @@ int pwrdm_del_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
pr_debug("powerdomain: hardware cannot set/clear sleep " pr_debug("powerdomain: hardware cannot set/clear sleep "
"dependency affecting %s from %s\n", pwrdm1->name, "dependency affecting %s from %s\n", pwrdm1->name,
pwrdm2->name); pwrdm2->name);
return IS_ERR(p); return PTR_ERR(p);
} }
pr_debug("powerdomain: will no longer prevent %s from sleeping if " pr_debug("powerdomain: will no longer prevent %s from sleeping if "
...@@ -664,7 +664,7 @@ int pwrdm_read_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2) ...@@ -664,7 +664,7 @@ int pwrdm_read_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
pr_debug("powerdomain: hardware cannot set/clear sleep " pr_debug("powerdomain: hardware cannot set/clear sleep "
"dependency affecting %s from %s\n", pwrdm1->name, "dependency affecting %s from %s\n", pwrdm1->name,
pwrdm2->name); pwrdm2->name);
return IS_ERR(p); return PTR_ERR(p);
} }
return prm_read_mod_bits_shift(pwrdm1->prcm_offs, OMAP3430_CM_SLEEPDEP, return prm_read_mod_bits_shift(pwrdm1->prcm_offs, OMAP3430_CM_SLEEPDEP,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment