Skip to content

Commit 558963c

Browse files
Dejin Zhenggregkh
authored andcommitted
usb: host: hisilicon: convert to devm_platform_get_and_ioremap_resource
Use devm_platform_get_and_ioremap_resource() to simplify code, which contains platform_get_resource() and devm_ioremap_resource(), it also get the resource for use by the following code. Reviewed-by: Geert Uytterhoeven <[email protected]> Acked-by: Mathias Nyman <[email protected]> Signed-off-by: Dejin Zheng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent fb22227 commit 558963c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/usb/host/xhci-histb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ static int xhci_histb_probe(struct platform_device *pdev)
219219
if (irq < 0)
220220
return irq;
221221

222-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
223-
histb->ctrl = devm_ioremap_resource(&pdev->dev, res);
222+
histb->ctrl = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
224223
if (IS_ERR(histb->ctrl))
225224
return PTR_ERR(histb->ctrl);
226225

0 commit comments

Comments
 (0)