[alsa-devel] [PATCH] fm801: move to pcim_* and devm_* functions

Andy Shevchenko andy.shevchenko at gmail.com
Wed Jan 7 14:40:26 CET 2015


On Wed, Jan 7, 2015 at 3:31 PM, Takashi Iwai <tiwai at suse.de> wrote:
> At Wed, 7 Jan 2015 15:27:35 +0200,
> Andy Shevchenko wrote:

Regarding to the original patch, is it okay now to apply?

[]

> I meant the release of regions allocated in
> pcim_iomap_regions_request_all().  The function requests all regions,
> not only for MMIO ones:
>
> int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask,
>                                    const char *name)
> {
>         int request_mask = ((1 << 6) - 1) & ~mask;
>         int rc;
>
>         rc = pci_request_selected_regions(pdev, request_mask, name);
>         if (rc)
>                 return rc;
>
>         rc = pcim_iomap_regions(pdev, mask, name);
>         if (rc)
>                 pci_release_selected_regions(pdev, request_mask);
>         return rc;
> }
>
> The regions allocated via pcim_iomap_regions() are released via
> pcim_iomap_release() properly.  But what about the former one, the
> regions allocated via pci_request_selected_regions()...?

Looks like it requires it's own release function to be implemented, yes.
Good catch.

-- 
With Best Regards,
Andy Shevchenko


More information about the Alsa-devel mailing list