gpio: intel-mid: fix the incorrect return of idle callback

intel_gpio_runtime_idle should return correct error code if it do fail.
make it more correct even though -EBUSY is the most possible return value.

Signed-off-by: bo.he <bo.he@intel.com>
Signed-off-by: xinhui.pan <xinhuiX.pan@intel.com>
Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
xinhui.pan 2014-01-31 13:08:01 -08:00 committed by Linus Walleij
parent cffcc92e96
commit 84a34575fe

View file

@ -394,8 +394,8 @@ static const struct irq_domain_ops intel_gpio_irq_ops = {
static int intel_gpio_runtime_idle(struct device *dev) static int intel_gpio_runtime_idle(struct device *dev)
{ {
pm_schedule_suspend(dev, 500); int err = pm_schedule_suspend(dev, 500);
return -EBUSY; return err ?: -EBUSY;
} }
static const struct dev_pm_ops intel_gpio_pm_ops = { static const struct dev_pm_ops intel_gpio_pm_ops = {