--- a/drivers/bluetooth/hci_intel.c +++ b/drivers/bluetooth/hci_intel.c @@ -29,7 +29,9 @@ #include #include #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0) #include +#endif #include #include @@ -166,7 +168,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_CODE >= KERNEL_VERSION(3,13,0) gpiod_set_value(idev->reset, powered); +#endif } spin_unlock(&intel_device_list_lock); @@ -895,12 +899,14 @@ static int intel_probe(struct platform_d return -ENODEV; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(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 platform_set_drvdata(pdev, idev);