mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ATA: platform_ide: Fix patch "driver: replace dev_request_mem_region with dev_request_mem_resource" dev_request_mem_region with dev_request_mem_resource" The driver trying to use memory resource, then IO resource. The ALT register is optional.
@ 2016-05-19 17:19 Alexander Shiyan
  2016-05-23  6:27 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Shiyan @ 2016-05-19 17:19 UTC (permalink / raw)
  To: barebox

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/ata/intf_platform_ide.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/ata/intf_platform_ide.c b/drivers/ata/intf_platform_ide.c
index c3af083..15f5c0a 100644
--- a/drivers/ata/intf_platform_ide.c
+++ b/drivers/ata/intf_platform_ide.c
@@ -104,17 +104,13 @@ static int platform_ide_probe(struct device_d *dev)
 	}
 
 	iores = dev_request_mem_resource(dev, 0);
-	if (IS_ERR(iores))
-		return PTR_ERR(iores);
-	reg_base = IOMEM(iores->start);
-
-	if (!IS_ERR(reg_base)) {
+	if (!IS_ERR(iores)) {
+		reg_base = IOMEM(iores->start);
 		mmio = 1;
 		iores = dev_request_mem_resource(dev, 1);
-		if (IS_ERR(iores))
-			return PTR_ERR(iores);
-		alt_base = IOMEM(iores->start);
-		if (IS_ERR(alt_base))
+		if (!IS_ERR(iores))
+			alt_base = IOMEM(iores->start);
+		else
 			alt_base = NULL;
 	} else {
 		reg = dev_get_resource(dev, IORESOURCE_IO, 0);
-- 
2.4.9


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-23  6:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-19 17:19 [PATCH] ATA: platform_ide: Fix patch "driver: replace dev_request_mem_region with dev_request_mem_resource" dev_request_mem_region with dev_request_mem_resource" The driver trying to use memory resource, then IO resource. The ALT register is optional Alexander Shiyan
2016-05-23  6:27 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox