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

ptp: ptp_ines: convert to devm_platform_ioremap_resource

Use the helper function that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Wei Yongjun and committed by
David S. Miller
00b5aac5 cb10228d

+1 -7
+1 -7
drivers/ptp/ptp_ines.c
··· 783 783 static int ines_ptp_ctrl_probe(struct platform_device *pld) 784 784 { 785 785 struct ines_clock *clock; 786 - struct resource *res; 787 786 void __iomem *addr; 788 787 int err = 0; 789 788 790 - res = platform_get_resource(pld, IORESOURCE_MEM, 0); 791 - if (!res) { 792 - dev_err(&pld->dev, "missing memory resource\n"); 793 - return -EINVAL; 794 - } 795 - addr = devm_ioremap_resource(&pld->dev, res); 789 + addr = devm_platform_ioremap_resource(pld, 0); 796 790 if (IS_ERR(addr)) { 797 791 err = PTR_ERR(addr); 798 792 goto out;