mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: barebox@lists.infradead.org
Subject: Re: [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.
Date: Mon, 23 May 2016 08:27:33 +0200	[thread overview]
Message-ID: <20160523062733.GK11148@pengutronix.de> (raw)
In-Reply-To: <1463678348-9046-1-git-send-email-shc_work@mail.ru>

On Thu, May 19, 2016 at 08:19:08PM +0300, Alexander Shiyan wrote:
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  drivers/ata/intf_platform_ide.c | 14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)

Applied, thanks.

I fixed the commit log a bit while applying, somehow the complete
message came up in the subject.

Sascha

> 
> 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
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

      reply	other threads:[~2016-05-23  6:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19 17:19 Alexander Shiyan
2016-05-23  6:27 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160523062733.GK11148@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=shc_work@mail.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox