Skip to content

Commit

Permalink
platform/surface: aggregator: Fix event disable function
Browse files Browse the repository at this point in the history
Disabling events silently fails due to the wrong command ID being used.
Instead of the command ID for the disable call, the command ID for the
enable call was being used. This causes the disable call to enable the
event instead. As the event is already enabled when we call this
function, the EC silently drops this command and does nothing.

Use the correct command ID for disabling the event to fix this.

Fixes: c167b9c ("platform/surface: Add Surface Aggregator subsystem")
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20210603000636.568846-1-luzmaximilian@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
Maximilian Luz authored and Hans de Goede committed Jun 3, 2021
1 parent c0e0436 commit b430e1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/surface/aggregator/controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -1907,7 +1907,7 @@ static int ssam_ssh_event_disable(struct ssam_controller *ctrl,
{
int status;

status = __ssam_ssh_event_request(ctrl, reg, reg.cid_enable, id, flags);
status = __ssam_ssh_event_request(ctrl, reg, reg.cid_disable, id, flags);

if (status < 0 && status != -EINVAL) {
ssam_err(ctrl,
Expand Down

0 comments on commit b430e1d

Please sign in to comment.