Return-Path: From: Hans de Goede To: Marcel Holtmann , Gustavo Padovan , Johan Hedberg Cc: Hans de Goede , =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Danis?= , Sebastian Reichel , robh@kernel.org, linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH 4/9] Bluetooth: hci_bcm: Move platform_get_irq call to bcm_probe Date: Mon, 2 Oct 2017 17:23:51 +0200 Message-Id: <20171002152356.4714-5-hdegoede@redhat.com> In-Reply-To: <20171002152356.4714-1-hdegoede@redhat.com> References: <20171002152356.4714-1-hdegoede@redhat.com> List-ID: The ACPI subsys is going to move over to instantiating ACPI enumerated HCIs as serdevs, rather then as platform devices. Most of the code in bcm_platform_probe is actually not platform specific and will work with any struct device passed to it, the one platform specific call in bcm_platform_probe is platform_get_irq. This commit moves platform_get_irq call to the platform-driver's bcm_probe function, this is a preparation patch for adding (runtime)pm support to the serdev path. Signed-off-by: Hans de Goede --- drivers/bluetooth/hci_bcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 00103307a776..ea530a56778d 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -776,7 +776,6 @@ static int bcm_platform_probe(struct bcm_device *dev) return PTR_ERR(dev->shutdown); /* IRQ can be declared in ACPI table as Interrupt or GpioInt */ - dev->irq = platform_get_irq(pdev, 0); if (dev->irq <= 0) { struct gpio_desc *gpio; @@ -853,6 +852,7 @@ static int bcm_probe(struct platform_device *pdev) return -ENOMEM; dev->pdev = pdev; + dev->irq = platform_get_irq(pdev, 0); if (has_acpi_companion(&pdev->dev)) { ret = bcm_acpi_probe(dev); -- 2.14.2