Subject: [merged] rtc-rtc-jz4740-use-devm_ioremap_resource.patch removed from -mm tree To: jg1.han@xxxxxxxxxxx,lars@xxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Fri, 04 Apr 2014 12:35:10 -0700 The patch titled Subject: rtc: rtc-jz4740: use devm_ioremap_resource() has been removed from the -mm tree. Its filename was rtc-rtc-jz4740-use-devm_ioremap_resource.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Jingoo Han <jg1.han@xxxxxxxxxxx> Subject: rtc: rtc-jz4740: use devm_ioremap_resource() Use devm_ioremap_resource() in order to make the code simpler, and move 'struct resource *mem' from 'struct jz4740_rtc' to jz4740_rtc_probe() because the 'mem' variable is used only in jz4740_rtc_probe(). Also the redundant return value check of platform_get_resource() is removed, because the value is checked by devm_ioremap_resource(). Signed-off-by: Jingoo Han <jg1.han@xxxxxxxxxxx> Cc: Lars-Peter Clausen <lars@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/rtc-jz4740.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff -puN drivers/rtc/rtc-jz4740.c~rtc-rtc-jz4740-use-devm_ioremap_resource drivers/rtc/rtc-jz4740.c --- a/drivers/rtc/rtc-jz4740.c~rtc-rtc-jz4740-use-devm_ioremap_resource +++ a/drivers/rtc/rtc-jz4740.c @@ -38,7 +38,6 @@ #define JZ_RTC_CTRL_ENABLE BIT(0) struct jz4740_rtc { - struct resource *mem; void __iomem *base; struct rtc_device *rtc; @@ -216,6 +215,7 @@ static int jz4740_rtc_probe(struct platf int ret; struct jz4740_rtc *rtc; uint32_t scratchpad; + struct resource *mem; rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); if (!rtc) @@ -227,25 +227,10 @@ static int jz4740_rtc_probe(struct platf return -ENOENT; } - rtc->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!rtc->mem) { - dev_err(&pdev->dev, "Failed to get platform mmio memory\n"); - return -ENOENT; - } - - rtc->mem = devm_request_mem_region(&pdev->dev, rtc->mem->start, - resource_size(rtc->mem), pdev->name); - if (!rtc->mem) { - dev_err(&pdev->dev, "Failed to request mmio memory region\n"); - return -EBUSY; - } - - rtc->base = devm_ioremap_nocache(&pdev->dev, rtc->mem->start, - resource_size(rtc->mem)); - if (!rtc->base) { - dev_err(&pdev->dev, "Failed to ioremap mmio memory\n"); - return -EBUSY; - } + mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); + rtc->base = devm_ioremap_resource(&pdev->dev, mem); + if (IS_ERR(rtc->base)) + return PTR_ERR(rtc->base); spin_lock_init(&rtc->lock); _ Patches currently in -mm which might be from jg1.han@xxxxxxxxxxx are origin.patch maintainers-update-ibm-serveraid-raid-info.patch drivers-video-backlight-backlightc-remove-backlight-sysfs-uevent.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html