xref: /linux/rust/helpers/pci.c (revision 29e16fcd67ee5b1d0417a657294cf96fdf2f8df9)
1 // SPDX-License-Identifier: GPL-2.0
2 
3 #include <linux/pci.h>
4 
5 resource_size_t rust_helper_pci_resource_len(struct pci_dev *pdev, int bar)
6 {
7 	return pci_resource_len(pdev, bar);
8 }
9 
10 bool rust_helper_dev_is_pci(const struct device *dev)
11 {
12 	return dev_is_pci(dev);
13 }
14 
15 #ifndef CONFIG_PCI_MSI
16 int rust_helper_pci_irq_vector(struct pci_dev *pdev, unsigned int nvec)
17 {
18 	return pci_irq_vector(pdev, nvec);
19 }
20 
21 #endif
22