Commit 0b49178e authored by Yangtao Li's avatar Yangtao Li Committed by Greg Kroah-Hartman
Browse files

nvmem: lpc18xx_otp: Convert to devm_platform_ioremap_resource()

parent cfadd0e7
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -68,14 +68,12 @@ static int lpc18xx_otp_probe(struct platform_device *pdev)
{
	struct nvmem_device *nvmem;
	struct lpc18xx_otp *otp;
	struct resource *res;

	otp = devm_kzalloc(&pdev->dev, sizeof(*otp), GFP_KERNEL);
	if (!otp)
		return -ENOMEM;

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	otp->base = devm_ioremap_resource(&pdev->dev, res);
	otp->base = devm_platform_ioremap_resource(pdev, 0);
	if (IS_ERR(otp->base))
		return PTR_ERR(otp->base);