Browse Source

gpio-exar/8250-exar: Do not even instantiate a GPIO device for Commtech cards

Commtech adapters need the MPIOs for internal purposes, and the
gpio-exar driver already refused to pick them up. But there is actually
no point in even creating the underlying platform device.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jan Kiszka 8 years ago
parent
commit
a39f2fe716
2 changed files with 3 additions and 4 deletions
  1. 0 3
      drivers/gpio/gpio-exar.c
  2. 3 1
      drivers/tty/serial/8250/8250_exar.c

+ 0 - 3
drivers/gpio/gpio-exar.c

@@ -124,9 +124,6 @@ static int gpio_exar_probe(struct platform_device *pdev)
 	void __iomem *p;
 	void __iomem *p;
 	int index, ret;
 	int index, ret;
 
 
-	if (pcidev->vendor != PCI_VENDOR_ID_EXAR)
-		return -ENODEV;
-
 	/*
 	/*
 	 * Map the pci device to get the register addresses.
 	 * Map the pci device to get the register addresses.
 	 * We will need to read and write those registers to control
 	 * We will need to read and write those registers to control

+ 3 - 1
drivers/tty/serial/8250/8250_exar.c

@@ -239,7 +239,9 @@ pci_xr17v35x_setup(struct exar8250 *priv, struct pci_dev *pcidev,
 		/* Setup Multipurpose Input/Output pins. */
 		/* Setup Multipurpose Input/Output pins. */
 		setup_gpio(p);
 		setup_gpio(p);
 
 
-		port->port.private_data = xr17v35x_register_gpio(pcidev);
+		if (pcidev->vendor == PCI_VENDOR_ID_EXAR)
+			port->port.private_data =
+				xr17v35x_register_gpio(pcidev);
 	}
 	}
 
 
 	return 0;
 	return 0;