Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08f94352 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

greybus: control: add error message to mode-switch helper



Print an informative error message in case sending the mode-switch
request fails.

Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent e3fbe484
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -163,9 +163,18 @@ int gb_control_disconnecting_operation(struct gb_control *control,

int gb_control_mode_switch_operation(struct gb_control *control)
{
	return gb_operation_unidirectional(control->connection,
	int ret;

	ret = gb_operation_unidirectional(control->connection,
						GB_CONTROL_TYPE_MODE_SWITCH,
						NULL, 0);
	if (ret) {
		dev_err(&control->dev, "failed to send mode switch: %d\n",
				ret);
		return ret;
	}

	return 0;
}

int gb_control_timesync_enable(struct gb_control *control, u8 count,