ams: use R_SUCCEED, R_THROW globally
This commit is contained in:
@@ -93,7 +93,7 @@ namespace ams::gpio::driver::impl {
|
||||
Result RegisterDeviceCode(DeviceCode device_code, Pad *pad) {
|
||||
AMS_ASSERT(pad != nullptr);
|
||||
R_TRY(GetDeviceCodeEntryManager().Add(device_code, pad));
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
bool UnregisterDeviceCode(DeviceCode device_code) {
|
||||
@@ -120,7 +120,7 @@ namespace ams::gpio::driver::impl {
|
||||
|
||||
/* Set output. */
|
||||
*out = device->SafeCastToPointer<Pad>();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result FindPadByNumber(Pad **out, int pad_number) {
|
||||
@@ -145,7 +145,7 @@ namespace ams::gpio::driver::impl {
|
||||
/* Check that we found the pad. */
|
||||
R_UNLESS(found, ddsf::ResultDeviceCodeNotFound());
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace ams::gpio::driver::impl {
|
||||
|
||||
/* We opened successfully. */
|
||||
pad_guard.Cancel();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void PadSessionImpl::Close() {
|
||||
@@ -82,7 +82,7 @@ namespace ams::gpio::driver::impl {
|
||||
/* We succeeded. */
|
||||
hl_guard.Cancel();
|
||||
ev_guard.Cancel();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void PadSessionImpl::UnbindInterrupt() {
|
||||
@@ -115,7 +115,7 @@ namespace ams::gpio::driver::impl {
|
||||
|
||||
Result PadSessionImpl::GetInterruptEnabled(bool *out) const {
|
||||
*out = this->GetDevice().SafeCastTo<Pad>().IsInterruptEnabled();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result PadSessionImpl::SetInterruptEnabled(bool en) {
|
||||
@@ -133,7 +133,7 @@ namespace ams::gpio::driver::impl {
|
||||
R_TRY(this->UpdateDriverInterruptEnabled());
|
||||
|
||||
pad_guard.Cancel();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void PadSessionImpl::SignalInterruptBoundEvent() {
|
||||
|
||||
Reference in New Issue
Block a user