---
name: "pci_find_resource"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/pci_find_resource"
---

# pci\_find\_resource(9)

Return matching PCI device resource

## NAME

pci\_find\_resource - Return matching PCI device resource

## SYNOPSIS

**struct resource \* pci\_find\_resource(struct pci\_dev \*** *dev***, struct resource \*** *res***);**

## ARGUMENTS

*dev*

PCI device to query

*res*

Resource to look for

## DESCRIPTION

Goes over standard PCI resources (BARs) and checks if the given resource is partially or fully contained in any of them. In that case the matching resource is returned, **NULL** otherwise.

## COPYRIGHT
