Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Krzysztof Kozlowski and committed by
Greg Kroah-Hartman
17d206a3 a85f13d5

+1 -4
+1 -4
drivers/usb/dwc3/dwc3-qcom.c
··· 735 735 struct device_node *np = pdev->dev.of_node; 736 736 struct device *dev = &pdev->dev; 737 737 struct dwc3_qcom *qcom; 738 - struct resource *res; 739 738 int ret, i; 740 739 bool ignore_pipe_clk; 741 740 bool wakeup_source; ··· 772 773 goto reset_assert; 773 774 } 774 775 775 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 776 - 777 - qcom->qscratch_base = devm_ioremap_resource(dev, res); 776 + qcom->qscratch_base = devm_platform_ioremap_resource(pdev, 0); 778 777 if (IS_ERR(qcom->qscratch_base)) { 779 778 ret = PTR_ERR(qcom->qscratch_base); 780 779 goto clk_disable;