lkml.org 
[lkml]   [2018]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 3/8] mtd: maps: gpio-addr-flash: Use devm_* functions
Hi Boris

On Thu, 27 Sep 2018, 13:35 Boris Brezillon, <boris.brezillon@bootlin.com> wrote:
>
> On Wed, 5 Sep 2018 16:36:38 +0200
> Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
> > @@ -234,9 +234,11 @@ static int gpio_flash_probe(struct platform_device *pdev)
> > state->map.copy_to = gf_copy_to;
> > state->map.bankwidth = pdata->width;
> > state->map.size = state->win_size * (1 << state->gpio_count);
> > - state->map.virt = ioremap_nocache(memory->start, state->win_size);
> > - if (!state->map.virt)
> > - return -ENOMEM;
> > + state->map.virt = devm_ioremap_resource(&pdev->dev, memory);
> > + if (IS_ERR(state->map.virt)) {
> > + dev_err(&pdev->dev, "failed to map memory\n");
>
> You can drop this error message, devm_ioremap_resource() already takes
> care of that (no need to send a new version, I'll fix it when applying).

Thanks for you review. I will do the port to gpiod next monday (I want
to try it on real hw)

Cheers!
>
> > + return PTR_ERR(state->map.virt);
> > + }
>

\
 
 \ /
  Last update: 2018-09-29 08:25    [W:0.051 / U:2.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site