Skip to content

Commit 17d206a

Browse files
krzkgregkh
authored andcommitted
usb: dwc3: qcom: simplify with devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() wrapper instead of two calls. This allows also dropping local 'res' variable. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/20240814-b4-cleanup-h-of-node-put-usb-v1-8-95481b9682bc@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a85f13d commit 17d206a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/usb/dwc3/dwc3-qcom.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
735735
struct device_node *np = pdev->dev.of_node;
736736
struct device *dev = &pdev->dev;
737737
struct dwc3_qcom *qcom;
738-
struct resource *res;
739738
int ret, i;
740739
bool ignore_pipe_clk;
741740
bool wakeup_source;
@@ -773,9 +772,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
773772
goto reset_assert;
774773
}
775774

776-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
777-
778-
qcom->qscratch_base = devm_ioremap_resource(dev, res);
775+
qcom->qscratch_base = devm_platform_ioremap_resource(pdev, 0);
779776
if (IS_ERR(qcom->qscratch_base)) {
780777
ret = PTR_ERR(qcom->qscratch_base);
781778
goto clk_disable;

0 commit comments

Comments
 (0)