From 0bdb080c70495ea4efbed7661b4fe6100bd5adde Mon Sep 17 00:00:00 2001 From: Dominik Sliwa Date: Thu, 21 Feb 2019 10:23:08 +0100 Subject: Revert "backports: Remove unused parts" This reverts commit ab3fd3b9a801a9faa2619e2e65207e736f859a6d. --- patches/0062-acpi-gpio-remove/hci_intel.patch | 67 +++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 patches/0062-acpi-gpio-remove/hci_intel.patch (limited to 'patches/0062-acpi-gpio-remove/hci_intel.patch') diff --git a/patches/0062-acpi-gpio-remove/hci_intel.patch b/patches/0062-acpi-gpio-remove/hci_intel.patch new file mode 100644 index 00000000..9237ce97 --- /dev/null +++ b/patches/0062-acpi-gpio-remove/hci_intel.patch @@ -0,0 +1,67 @@ +--- a/drivers/bluetooth/hci_intel.c ++++ b/drivers/bluetooth/hci_intel.c +@@ -29,7 +29,9 @@ + #include + #include + #include ++#if LINUX_VERSION_IS_GEQ(3,13,0) + #include ++#endif + #include + #include + #include +@@ -379,7 +381,9 @@ static int intel_set_power(struct hci_ua + BT_INFO("hu %p, Switching compatible pm device (%s) to %u", + hu, dev_name(&idev->pdev->dev), powered); + ++#if LINUX_VERSION_IS_GEQ(3,13,0) + gpiod_set_value(idev->reset, powered); ++#endif + + /* Provide to idev a hu reference which is used to run LPM + * transactions (lpm suspend/resume) from PM callbacks. +@@ -1306,14 +1310,17 @@ static int intel_probe(struct platform_d + + idev->pdev = pdev; + ++#if LINUX_VERSION_IS_GEQ(3,17,0) + idev->reset = devm_gpiod_get_optional(&pdev->dev, "reset", + GPIOD_OUT_LOW); + if (IS_ERR(idev->reset)) { + dev_err(&pdev->dev, "Unable to retrieve gpio\n"); + return PTR_ERR(idev->reset); + } ++#endif + + idev->irq = platform_get_irq(pdev, 0); ++#if LINUX_VERSION_IS_GEQ(3,17,0) + if (idev->irq < 0) { + struct gpio_desc *host_wake; + +@@ -1332,12 +1339,15 @@ static int intel_probe(struct platform_d + goto no_irq; + } + } ++#endif + + /* Only enable wake-up/irq when controller is powered */ + device_set_wakeup_capable(&pdev->dev, true); + device_wakeup_disable(&pdev->dev); + ++#if LINUX_VERSION_IS_GEQ(3,17,0) + no_irq: ++#endif + platform_set_drvdata(pdev, idev); + + /* Place this instance on the device list */ +@@ -1345,8 +1355,10 @@ no_irq: + list_add_tail(&idev->list, &intel_device_list); + mutex_unlock(&intel_device_list_lock); + ++#if LINUX_VERSION_IS_GEQ(3,13,0) + dev_info(&pdev->dev, "registered, gpio(%d)/irq(%d).\n", + desc_to_gpio(idev->reset), idev->irq); ++#endif + + return 0; + } -- cgit v1.2.3