From 68a88d99b78acd3d2f3a4a07921cd5dbc7782a82 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sun, 1 Oct 2017 13:40:18 -0700 Subject: [PATCH] Fix mmio resource request We have to request a memory resource with IORESOURCE_MEM. Signed-off-by: Guenter Roeck --- it87.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/it87.c b/it87.c index 4654485..9d6d474 100644 --- a/it87.c +++ b/it87.c @@ -3885,15 +3885,14 @@ static int it87_probe(struct platform_device *pdev) return -ENOMEM; res = platform_get_resource(pdev, IORESOURCE_IO, 0); - if (!res) - return -EINVAL; - if (res->flags & IORESOURCE_IO) { + if (res) { if (!devm_request_region(dev, res->start, IT87_EC_EXTENT, DRVNAME)) { dev_err(dev, "Failed to request region %pR\n", res); return -EBUSY; } } else { + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); data->mmio = devm_ioremap_resource(dev, res); if (IS_ERR(data->mmio)) return PTR_ERR(data->mmio); -- 2.39.5