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.

w1: omap-hdq: use devm_platform_ioremap_resource() to simplify code

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190802135010.24052-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

YueHaibing and committed by
Greg Kroah-Hartman
7008aff2 b0a523fa

+1 -3
+1 -3
drivers/w1/masters/omap_hdq.c
··· 660 660 { 661 661 struct device *dev = &pdev->dev; 662 662 struct hdq_data *hdq_data; 663 - struct resource *res; 664 663 int ret, irq; 665 664 u8 rev; 666 665 const char *mode; ··· 673 674 hdq_data->dev = dev; 674 675 platform_set_drvdata(pdev, hdq_data); 675 676 676 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 677 - hdq_data->hdq_base = devm_ioremap_resource(dev, res); 677 + hdq_data->hdq_base = devm_platform_ioremap_resource(pdev, 0); 678 678 if (IS_ERR(hdq_data->hdq_base)) 679 679 return PTR_ERR(hdq_data->hdq_base); 680 680