sysreset: Fix unsupported request return values
The description of the sysreset request method in <sysreset.h> says that the return value should be -EPROTONOSUPPORT if the requested reset type is not supported by this device. Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -33,7 +33,7 @@ static int poweroff_gpio_request(struct udevice *dev, enum sysreset_t type)
|
||||
int r;
|
||||
|
||||
if (type != SYSRESET_POWER_OFF)
|
||||
return -ENOSYS;
|
||||
return -EPROTONOSUPPORT;
|
||||
|
||||
debug("GPIO poweroff\n");
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ static int psci_sysreset_request(struct udevice *dev, enum sysreset_t type)
|
||||
psci_sys_poweroff();
|
||||
break;
|
||||
default:
|
||||
return -ENOSYS;
|
||||
return -EPROTONOSUPPORT;
|
||||
}
|
||||
|
||||
return -EINPROGRESS;
|
||||
|
||||
@@ -21,7 +21,7 @@ static int sandbox_warm_sysreset_request(struct udevice *dev,
|
||||
state->last_sysreset = type;
|
||||
break;
|
||||
default:
|
||||
return -ENOSYS;
|
||||
return -EPROTONOSUPPORT;
|
||||
}
|
||||
if (!state->sysreset_allowed[type])
|
||||
return -EACCES;
|
||||
@@ -70,7 +70,7 @@ static int sandbox_sysreset_request(struct udevice *dev, enum sysreset_t type)
|
||||
return -EACCES;
|
||||
sandbox_exit();
|
||||
default:
|
||||
return -ENOSYS;
|
||||
return -EPROTONOSUPPORT;
|
||||
}
|
||||
if (!state->sysreset_allowed[type])
|
||||
return -EACCES;
|
||||
|
||||
@@ -29,7 +29,7 @@ static int wdt_reboot_request(struct udevice *dev, enum sysreset_t type)
|
||||
return ret;
|
||||
break;
|
||||
default:
|
||||
return -ENOSYS;
|
||||
return -EPROTONOSUPPORT;
|
||||
}
|
||||
|
||||
return -EINPROGRESS;
|
||||
|
||||
@@ -87,7 +87,7 @@ static int x86_sysreset_request(struct udevice *dev, enum sysreset_t type)
|
||||
return ret;
|
||||
return -EINPROGRESS;
|
||||
default:
|
||||
return -ENOSYS;
|
||||
return -EPROTONOSUPPORT;
|
||||
}
|
||||
|
||||
outb(value, IO_PORT_RESET);
|
||||
|
||||
Reference in New Issue
Block a user