From c98f6fed93ca49a956d628200b2dfa1454ce6fbb Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Wed, 5 Oct 2022 13:18:34 +0100 Subject: spi: Implement spi_set_speed This function is already defined in spi.h but no implementation of it currently exists in the tree. The implementation is based on the static function spi_set_speed_mode(). The function prototype is modified so that an success or error condition can be returned to the caller. Signed-off-by: Paul Barker Reviewed-by: Heinrich Schuchardt --- include/spi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/spi.h b/include/spi.h index 9a8c1fb260e..1bc18e65525 100644 --- a/include/spi.h +++ b/include/spi.h @@ -352,8 +352,10 @@ void spi_cs_deactivate(struct spi_slave *slave); * This sets a new speed to be applied for next spi_xfer(). * @slave: The SPI slave * @hz: The transfer speed + * + * Returns: 0 on success, or a negative value on error. */ -void spi_set_speed(struct spi_slave *slave, uint hz); +int spi_set_speed(struct spi_slave *slave, uint hz); /** * Write 8 bits, then read 8 bits. -- cgit v1.2.3 From 70089c13a73f58315547982573be2016e7a70958 Mon Sep 17 00:00:00 2001 From: Ilias Apalodimas Date: Sun, 16 Oct 2022 11:36:32 +0300 Subject: efi_loader: remove efi_delete_handle on loadfile2 Loadfile2 code is installing two protocols on it's own handle and uses efi_delete_handle() to clean it up on failure(s). However commit 05c4c9e21ae6 ("efi_loader: define internal implementations of install/uninstallmultiple") prepares the ground for us to clean up efi_delete_handle() used in favor of Install/UninstallMultipleProtocol. While at it clean up the non needed void casts to (void *) on the protolcol installation. Signed-off-by: Ilias Apalodimas Reviewed-by: Heinrich Schuchardt --- include/efi_loader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/efi_loader.h b/include/efi_loader.h index 1bac3f49a3e..0c6c95ba464 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -570,7 +570,7 @@ efi_status_t efi_net_register(void); /* Called by bootefi to make the watchdog available */ efi_status_t efi_watchdog_register(void); efi_status_t efi_initrd_register(void); -void efi_initrd_deregister(void); +efi_status_t efi_initrd_deregister(void); /* Called by bootefi to make SMBIOS tables available */ /** * efi_acpi_register() - write out ACPI tables -- cgit v1.2.3