Skip to content

Commit fccebbd

Browse files
gwendalcrTzung-Bi Shih
authored andcommitted
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: be4fccb ("platform/chrome: cros_ec_lpc: Support direct EC register memory access") Signed-off-by: Gwendal Grignou <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tzung-Bi Shih <[email protected]>
1 parent 15fa062 commit fccebbd

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/platform/chrome/cros_ec_lpc.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -562,11 +562,7 @@ static int cros_ec_lpc_probe(struct platform_device *pdev)
562562
*/
563563
status = acpi_walk_resources(adev->handle, METHOD_NAME__CRS,
564564
cros_ec_lpc_resources, ec_lpc);
565-
if (ACPI_FAILURE(status)) {
566-
dev_err(dev, "failed to get resources\n");
567-
return -ENODEV;
568-
}
569-
if (ec_lpc->mem32.address_length) {
565+
if (ACPI_SUCCESS(status) && ec_lpc->mem32.address_length) {
570566
ec_lpc->base = devm_ioremap(dev,
571567
ec_lpc->mem32.address,
572568
ec_lpc->mem32.address_length);

0 commit comments

Comments
 (0)