summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2025-01-14 23:21:22 +0300
committerTzung-Bi Shih <tzungbi@kernel.org>2025-01-15 04:28:50 +0300
commitfccebbdde2067e359f01382a72c31ed2af7acbac (patch)
treee83ebc79c810e6ddf4b1e3aab96c53553e6d5043 /drivers/platform
parent15fa0621d7b389effbf09e94b765e828f931f8c0 (diff)
downloadlinux-fccebbdde2067e359f01382a72c31ed2af7acbac.tar.xz
platform/chrome: cros_ec_lpc: Handle EC without CRS section
Fix logic to support GOOG0004 device without CRS section. Instead of failing, assume there are not memory mapped EC registers. Fixes: be4fccb5e1fb ("platform/chrome: cros_ec_lpc: Support direct EC register memory access") Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20250114202122.2352277-1-gwendal@chromium.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/chrome/cros_ec_lpc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
index ee9e3c8685cf..5a2f1d98b350 100644
--- a/drivers/platform/chrome/cros_ec_lpc.c
+++ b/drivers/platform/chrome/cros_ec_lpc.c
@@ -562,11 +562,7 @@ static int cros_ec_lpc_probe(struct platform_device *pdev)
*/
status = acpi_walk_resources(adev->handle, METHOD_NAME__CRS,
cros_ec_lpc_resources, ec_lpc);
- if (ACPI_FAILURE(status)) {
- dev_err(dev, "failed to get resources\n");
- return -ENODEV;
- }
- if (ec_lpc->mem32.address_length) {
+ if (ACPI_SUCCESS(status) && ec_lpc->mem32.address_length) {
ec_lpc->base = devm_ioremap(dev,
ec_lpc->mem32.address,
ec_lpc->mem32.address_length);