linux/rust/helpers/pci.c
Danilo Krummrich 4231712c8e rust: pci: use generic device drvdata accessors
Take advantage of the generic drvdata accessors of the generic Device
type.

While at it, use from_result() instead of match.

Link: https://lore.kernel.org/r/20250621195118.124245-5-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2025-07-09 00:04:33 +02:00

13 lines
262 B
C

// SPDX-License-Identifier: GPL-2.0
#include <linux/pci.h>
resource_size_t rust_helper_pci_resource_len(struct pci_dev *pdev, int bar)
{
return pci_resource_len(pdev, bar);
}
bool rust_helper_dev_is_pci(const struct device *dev)
{
return dev_is_pci(dev);
}