Skip to contentSkip to conversation

leds: wm831x-status: Request a REG resource

PATCH In review Mark Brown 2 participants 2 messages Aug 29, 2013 – Aug 30, 2013

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 leds: wm831x-status: Request a REG resource

From: Mark Brown <[email protected]>

The wm831x-status driver was not converted to use a REG resource when they were introduced and the rest of the wm831x drivers converted, causing it to fail to probe due to requesting the wrong resource type.

---
 drivers/leds/leds-wm831x-status.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/leds/leds-wm831x-status.c +2 -2
index c32dad4..0a1a13f 100644
@@ -230,9 +230,9 @@ static int wm831x_status_probe(struct platform_device *pdev)
 	int id = pdev->id % ARRAY_SIZE(chip_pdata->status);
 	int ret;
 
-	res = platform_get_resource(pdev, IORESOURCE_IO, 0);
+	res = platform_get_resource(pdev, IORESOURCE_REG, 0);
 	if (res == NULL) {
-		dev_err(&pdev->dev, "No I/O resource\n");
+		dev_err(&pdev->dev, "No register resource\n");
 		ret = -EINVAL;
 		goto err;
 	}
Signature · 1 line
1.8.4.rc3
#1 lore raw
Quoted 6 lines · Mark Brown

From: Mark Brown <[email protected]>

The wm831x-status driver was not converted to use a REG resource when they were introduced and the rest of the wm831x drivers converted, causing it to fail to probe due to requesting the wrong resource type.

Nice, merged.
Thanks Mark,
-Bryan

Quoted 25 lines
---
 drivers/leds/leds-wm831x-status.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/leds/leds-wm831x-status.c +2 -3
index c32dad4..0a1a13f 100644
@@ -230,9 +230,9 @@ static int wm831x_status_probe(struct platform_device *pdev)
        int id = pdev->id % ARRAY_SIZE(chip_pdata->status);
        int ret;
 
-       res = platform_get_resource(pdev, IORESOURCE_IO, 0);
+       res = platform_get_resource(pdev, IORESOURCE_REG, 0);
        if (res == NULL) {
-               dev_err(&pdev->dev, "No I/O resource\n");
+               dev_err(&pdev->dev, "No register resource\n");
                ret = -EINVAL;
                goto err;
        }
--

1.8.4.rc3