summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2017-05-21 11:49:24 +0200
committerJan Kiszka <jan.kiszka@siemens.com>2017-07-03 08:30:51 +0200
commit4076cf08ac7673aca7d4dd9ddf18045d08dbc292 (patch)
tree4a76f259c6dcaef5099f5937de13b941babcce21 /drivers/tty
parent8847f5f9ef554269d2a06100b311d363b9727da6 (diff)
gpio-exar/8250-exar: Rearrange gpiochip parenthood
Set the parent of the exar gpiochip to its platform device, like other gpiochips are doing it. In order to keep the relationship discoverable for ACPI systems, set the platform device companion to the PCI 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>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_exar.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
index 36877c8ad652..32e3cb58193f 100644
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
@@ -9,6 +9,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License.
*/
+#include <linux/acpi.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -197,6 +198,7 @@ xr17v35x_register_gpio(struct pci_dev *pcidev)
return NULL;
pdev->dev.parent = &pcidev->dev;
+ ACPI_COMPANION_SET(&pdev->dev, ACPI_COMPANION(&pcidev->dev));
if (platform_device_add(pdev) < 0) {
platform_device_put(pdev);