Skip to content

Commit 85826c1

Browse files
Philipp Stannerkwilczynski
authored andcommitted
PCI: Remove exclusive requests flags from _pcim_request_region()
pcim_request_region_exclusive(), the only user in PCI devres that needed exclusive region requests, has been removed. All features related to exclusive requests can, therefore, be removed, too. Remove them. Signed-off-by: Philipp Stanner <[email protected]> [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8e99874 commit 85826c1

File tree

1 file changed

+15
-21
lines changed

1 file changed

+15
-21
lines changed

drivers/pci/devres.c

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,20 @@ int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name)
808808
}
809809
EXPORT_SYMBOL(pcim_iomap_regions);
810810

811-
static int _pcim_request_region(struct pci_dev *pdev, int bar, const char *name,
812-
int request_flags)
811+
/**
812+
* pcim_request_region - Request a PCI BAR
813+
* @pdev: PCI device to request region for
814+
* @bar: Index of BAR to request
815+
* @name: Name of the driver requesting the resource
816+
*
817+
* Returns: 0 on success, a negative error code on failure.
818+
*
819+
* Request region specified by @bar.
820+
*
821+
* The region will automatically be released on driver detach. If desired,
822+
* release manually only with pcim_release_region().
823+
*/
824+
int pcim_request_region(struct pci_dev *pdev, int bar, const char *name)
813825
{
814826
int ret;
815827
struct pcim_addr_devres *res;
@@ -823,7 +835,7 @@ static int _pcim_request_region(struct pci_dev *pdev, int bar, const char *name,
823835
res->type = PCIM_ADDR_DEVRES_TYPE_REGION;
824836
res->bar = bar;
825837

826-
ret = __pcim_request_region(pdev, bar, name, request_flags);
838+
ret = __pcim_request_region(pdev, bar, name, 0);
827839
if (ret != 0) {
828840
pcim_addr_devres_free(res);
829841
return ret;
@@ -832,24 +844,6 @@ static int _pcim_request_region(struct pci_dev *pdev, int bar, const char *name,
832844
devres_add(&pdev->dev, res);
833845
return 0;
834846
}
835-
836-
/**
837-
* pcim_request_region - Request a PCI BAR
838-
* @pdev: PCI device to request region for
839-
* @bar: Index of BAR to request
840-
* @name: Name of the driver requesting the resource
841-
*
842-
* Returns: 0 on success, a negative error code on failure.
843-
*
844-
* Request region specified by @bar.
845-
*
846-
* The region will automatically be released on driver detach. If desired,
847-
* release manually only with pcim_release_region().
848-
*/
849-
int pcim_request_region(struct pci_dev *pdev, int bar, const char *name)
850-
{
851-
return _pcim_request_region(pdev, bar, name, 0);
852-
}
853847
EXPORT_SYMBOL(pcim_request_region);
854848

855849
/**

0 commit comments

Comments
 (0)