diff options
| author | Heinrich Schuchardt <[email protected]> | 2025-11-14 10:32:41 +0100 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2025-11-21 19:30:32 +0100 |
| commit | e58a54571e1d7d572a05b66f7dd1aafbfa7fea51 (patch) | |
| tree | 961ff683b88b2786357aad2765aed73ac07e3ce7 /lib | |
| parent | 4988e683bc275a361204ad53dd95a4d4a7faecaf (diff) | |
efi_selftest: simplify efi_selftest_reset
Use global st_runtime.
Reviewed-by: Ilias Apalodimas <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/efi_selftest/efi_selftest_reset.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/lib/efi_selftest/efi_selftest_reset.c b/lib/efi_selftest/efi_selftest_reset.c index 5dfe517de4f..8125f51815e 100644 --- a/lib/efi_selftest/efi_selftest_reset.c +++ b/lib/efi_selftest/efi_selftest_reset.c @@ -10,22 +10,6 @@ #include <efi_selftest.h> -static struct efi_runtime_services *runtime; - -/* - * Setup unit test. - * - * @handle: handle of the loaded image - * @systable: system table - * Return: EFI_ST_SUCCESS for success - */ -static int setup(const efi_handle_t handle, - const struct efi_system_table *systable) -{ - runtime = systable->runtime; - return EFI_ST_SUCCESS; -} - /* * Execute unit test. * @@ -35,7 +19,7 @@ static int execute(void) { u16 reset_data[] = u"Reset by selftest"; - runtime->reset_system(EFI_RESET_COLD, EFI_SUCCESS, + st_runtime->reset_system(EFI_RESET_COLD, EFI_SUCCESS, sizeof(reset_data), reset_data); efi_st_error("Reset failed.\n"); return EFI_ST_FAILURE; @@ -44,7 +28,6 @@ static int execute(void) EFI_UNIT_TEST(reset) = { .name = "reset system", .phase = EFI_EXECUTE_BEFORE_BOOTTIME_EXIT, - .setup = setup, .execute = execute, .on_request = true, }; @@ -52,7 +35,6 @@ EFI_UNIT_TEST(reset) = { EFI_UNIT_TEST(resetrt) = { .name = "reset system runtime", .phase = EFI_SETUP_BEFORE_BOOTTIME_EXIT, - .setup = setup, .execute = execute, .on_request = true, }; |
