From 222ba497c1337c6f25ec0d4bcb4cff2782a52665 Mon Sep 17 00:00:00 2001 From: Luis Delgado de Mendoza Date: Fri, 30 Jun 2023 11:21:51 -0700 Subject: aoc: Fix the device check for power commands in aoc_channel_dev. CTS Sensor/DeviceSuspendTests was failing because the device fails to enter the suspend state. Bug: 288985122 Fix: 288985122 Test: Validated CTS passes. Change-Id: I1cfdae577e8e3636795afc9b900b50585db6da5a Signed-off-by: Luis Delgado De Mendoza --- aoc_channel_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aoc_channel_dev.c b/aoc_channel_dev.c index 2532f79..7da42a1 100644 --- a/aoc_channel_dev.c +++ b/aoc_channel_dev.c @@ -855,7 +855,7 @@ static int aocc_prepare(struct device *dev) struct aoc_service_dev *service = container_of(parent, struct aoc_service_dev, dev); int rc; - if (strcmp(dev_name(dev), "com.google.usf") != 0) + if (strcmp(dev_name(&service->dev), "com.google.usf") != 0) return 0; rc = aocc_send_cmd_msg(service, AOCC_CMD_SUSPEND_PREPARE, 0); @@ -871,7 +871,7 @@ static void aocc_complete(struct device *dev) struct aoc_service_dev *service = container_of(parent, struct aoc_service_dev, dev); int rc; - if (strcmp(dev_name(dev), "com.google.usf") != 0) + if (strcmp(dev_name(&service->dev), "com.google.usf") != 0) return; rc = aocc_send_cmd_msg(service, AOCC_CMD_WAKEUP_COMPELTE, 0); -- cgit v1.2.3