lkml.org 
[lkml]   [2019]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/9] drivers: ata: ahci_xgene: use devm_platform_ioremap_resource()
From
Date
Hello!

On 03/12/2019 12:19 PM, Enrico Weigelt, metux IT consult wrote:

> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
> drivers/ata/ahci_xgene.c | 21 +++++++--------------
> 1 file changed, 7 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
> index 7e157e1..99c622c 100644
> --- a/drivers/ata/ahci_xgene.c
> +++ b/drivers/ata/ahci_xgene.c
> @@ -752,7 +752,6 @@ static int xgene_ahci_probe(struct platform_device *pdev)
[...]
> /* Retrieve the optional IP mux resource */
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 4);
> - if (res) {
> - void __iomem *csr = devm_ioremap_resource(dev, res);
> - if (IS_ERR(csr))
> - return PTR_ERR(csr);
> -
> - ctx->csr_mux = csr;
> + ctx->csr_mux = csr = devm_platform_ioremap_resource(pdev, 4);
> + if (IS_ERR(ctx->csr_mux)) {
> + dev_info(&pdev->dev, "cant get ip mux resource (optional)");

Can't.

> + ctx->csr_mux = NULL;

MBR, Sergei

\
 
 \ /
  Last update: 2019-03-12 15:44    [W:0.101 / U:1.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site