| e6df0f64 | 21-Nov-2025 |
Haotian Zhang <vulab@iscas.ac.cn> |
greybus: gb-beagleplay: Fix timeout handling in bootloader functions
wait_for_completion_timeout() returns the remaining jiffies (at least 1) on success or 0 on timeout, but never negative error cod
greybus: gb-beagleplay: Fix timeout handling in bootloader functions
wait_for_completion_timeout() returns the remaining jiffies (at least 1) on success or 0 on timeout, but never negative error codes. The current code incorrectly checks for negative values, causing timeouts to be ignored and treated as success.
Check for a zero return value to correctly identify and handle timeout events.
Fixes: 0cf7befa3ea2 ("greybus: gb-beagleplay: Add firmware upload API") Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Link: https://patch.msgid.link/20251121064027.571-1-vulab@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| a13bd6f3 | 26-Feb-2024 |
Ricardo B. Marliere <ricardo@marliere.net> |
greybus: move is_gb_* functions out of greybus.h
The functions below are only used within the context of drivers/greybus/core.c, so move them all into core and drop their 'inline' specifiers:
is_gb
greybus: move is_gb_* functions out of greybus.h
The functions below are only used within the context of drivers/greybus/core.c, so move them all into core and drop their 'inline' specifiers:
is_gb_host_device(), is_gb_module(), is_gb_interface(), is_gb_control(), is_gb_bundle() and is_gb_svc().
Suggested-by: Alex Elder <elder@ieee.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net> Reviewed-by: Alex Elder <elder@linaro.org> Link: https://lore.kernel.org/r/20240226-device_cleanup-greybus2-v1-1-5f7d1161e684@marliere.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| e869b72b | 19-Feb-2024 |
Ricardo B. Marliere <ricardo@marliere.net> |
greybus: constify the struct device_type usage
Since commit aed65af1cc2f ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the greybus_hd_typ
greybus: constify the struct device_type usage
Since commit aed65af1cc2f ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the greybus_hd_type, greybus_module_type, greybus_interface_type, greybus_control_type, greybus_bundle_type and greybus_svc_type variables to be constant structures as well, placing it into read-only memory which can not be modified at runtime.
Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net> Reviewed-by: Alex Elder <elder@linaro.org> Link: https://lore.kernel.org/r/20240219-device_cleanup-greybus-v1-1-babb3f65e8cc@marliere.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|