OSDN Git Service

leds: qpnp-wled: Fix parameters passed to of_get_address_byname()
authorSubbaraman Narayanamurthy <subbaram@codeaurora.org>
Thu, 24 Aug 2017 01:44:15 +0000 (18:44 -0700)
committerSubbaraman Narayanamurthy <subbaram@codeaurora.org>
Tue, 24 Oct 2017 23:35:46 +0000 (16:35 -0700)
Pass NULL pointer to of_get_address_byname() for size and flags
parameters instead of an integer value 0.

Change-Id: I53984141bb8f1164c27b6a9a5d90853b4d077ee1
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
drivers/leds/leds-qpnp-wled.c

index 27f4a3b..6d539ec 100644 (file)
@@ -2441,7 +2441,7 @@ static int qpnp_wled_probe(struct platform_device *pdev)
                wled->pmic_rev_id->pmic_subtype, wled->pmic_rev_id->rev4);
 
        prop = of_get_address_by_name(pdev->dev.of_node, QPNP_WLED_SINK_BASE,
-                       0, 0);
+                       NULL, NULL);
        if (!prop) {
                dev_err(&pdev->dev, "Couldnt find sink's addr rc %d\n", rc);
                return rc;
@@ -2449,7 +2449,7 @@ static int qpnp_wled_probe(struct platform_device *pdev)
        wled->sink_base = be32_to_cpu(*prop);
 
        prop = of_get_address_by_name(pdev->dev.of_node, QPNP_WLED_CTRL_BASE,
-                       0, 0);
+                       NULL, NULL);
        if (!prop) {
                dev_err(&pdev->dev, "Couldnt find ctrl's addr rc = %d\n", rc);
                return rc;