]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: omap3isp: Use syscon_regmap_lookup_by_phandle_args
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sun, 12 Jan 2025 13:46:47 +0000 (14:46 +0100)
committerHans Verkuil <hverkuil@xs4all.nl>
Tue, 4 Mar 2025 12:35:32 +0000 (13:35 +0100)
Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over
syscon_regmap_lookup_by_phandle() combined with getting the syscon
argument.  Except simpler code this annotates within one line that given
phandle has arguments, so grepping for code would be easier.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/ti/omap3isp/isp.c

index a7fd808aea1e782bc15f73413c9d0fe5daeb4c85..7d549803fb925745b89d2c3f7922ef15cd7637dc 100644 (file)
@@ -2279,18 +2279,14 @@ static int isp_probe(struct platform_device *pdev)
        if (ret)
                goto error_release_isp;
 
-       isp->syscon = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
-                                                     "syscon");
+       isp->syscon = syscon_regmap_lookup_by_phandle_args(pdev->dev.of_node,
+                                                          "syscon", 1,
+                                                          &isp->syscon_offset);
        if (IS_ERR(isp->syscon)) {
                ret = PTR_ERR(isp->syscon);
                goto error_release_isp;
        }
 
-       ret = of_property_read_u32_index(pdev->dev.of_node,
-                                        "syscon", 1, &isp->syscon_offset);
-       if (ret)
-               goto error_release_isp;
-
        isp->autoidle = autoidle;
 
        mutex_init(&isp->isp_mutex);