Commit 04074235 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

pci: rename pci_device_has_non_null_driver to non_uio



This more accurately represents what function it performs.

Also remove pci_device_has_uio_driver() from the public API.  Callers
should use pci_device_has_non_uio_driver() instead.

Change-Id: I9623fe1345b43e981d5823804e33d01ac0d3bb1c
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 2ced60e9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -176,8 +176,8 @@ ioat_init(void)
		       pci_dev->vendor_id, pci_dev->device_id,
		       pci_device_get_device_name(pci_dev));

		if (pci_device_has_non_null_driver(pci_dev)) {
			printf("Device has kernel driver, skipping...\n");
		if (pci_device_has_non_uio_driver(pci_dev)) {
			printf("Device has non-uio kernel driver, skipping...\n");
			continue;
		}

+2 −2
Original line number Diff line number Diff line
@@ -191,8 +191,8 @@ ioat_init(void)
		       pci_dev->vendor_id, pci_dev->device_id,
		       pci_device_get_device_name(pci_dev));

		if (pci_device_has_non_null_driver(pci_dev)) {
			printf("Device has kernel driver, skipping...\n");
		if (pci_device_has_non_uio_driver(pci_dev)) {
			printf("Device has non-uio kernel driver, skipping...\n");
			continue;
		}

+2 −2
Original line number Diff line number Diff line
@@ -584,8 +584,8 @@ int main(int argc, char **argv)
	while ((pci_dev = pci_device_next(pci_dev_iter))) {
		struct nvme_controller *ctrlr;

		if (pci_device_has_non_null_driver(pci_dev)) {
			fprintf(stderr, "non-null kernel driver attached to nvme\n");
		if (pci_device_has_non_uio_driver(pci_dev)) {
			fprintf(stderr, "non-uio kernel driver attached to nvme\n");
			fprintf(stderr, " controller at pci bdf %d:%d:%d\n",
				pci_dev->bus, pci_dev->dev, pci_dev->func);
			fprintf(stderr, " skipping...\n");
+2 −2
Original line number Diff line number Diff line
@@ -705,8 +705,8 @@ register_controllers(void)
	while ((pci_dev = pci_device_next(pci_dev_iter))) {
		struct nvme_controller *ctrlr;

		if (pci_device_has_non_null_driver(pci_dev)) {
			fprintf(stderr, "non-null kernel driver attached to nvme\n");
		if (pci_device_has_non_uio_driver(pci_dev)) {
			fprintf(stderr, "non-uio kernel driver attached to nvme\n");
			fprintf(stderr, " controller at pci bdf %d:%d:%d\n",
				pci_dev->bus, pci_dev->dev, pci_dev->func);
			fprintf(stderr, " skipping...\n");
+1 −2
Original line number Diff line number Diff line
@@ -39,8 +39,7 @@
#define PCI_UIO_DRIVER		"uio_pci_generic"

int pci_device_get_serial_number(struct pci_device *dev, char *sn, int len);
int pci_device_has_uio_driver(struct pci_device *dev);
int pci_device_has_non_null_driver(struct pci_device *dev);
int pci_device_has_non_uio_driver(struct pci_device *dev);
int pci_device_unbind_kernel_driver(struct pci_device *dev);
int pci_device_bind_uio_driver(struct pci_device *dev, char *driver_name);
int pci_device_switch_to_uio_driver(struct pci_device *pci_dev);
Loading