xref: /linux/rust/helpers/pci.c (revision 1b5f3c51fbb8042efb314484b47b2092cdd40bf6)
1 // SPDX-License-Identifier: GPL-2.0
2 
3 #include <linux/pci.h>
4 
5 void rust_helper_pci_set_drvdata(struct pci_dev *pdev, void *data)
6 {
7 	pci_set_drvdata(pdev, data);
8 }
9 
10 void *rust_helper_pci_get_drvdata(struct pci_dev *pdev)
11 {
12 	return pci_get_drvdata(pdev);
13 }
14 
15 resource_size_t rust_helper_pci_resource_len(struct pci_dev *pdev, int bar)
16 {
17 	return pci_resource_len(pdev, bar);
18 }
19