mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
msm: pcie: update deprecated wakeup_source_* API
Remove wakeup_source_init and wakeup_source_remove API as they are deprecated. Instead use wakeup_source_register and wakeup_source_unregister APIs. Change-Id: Id381500ac13e816937542a6979bf36b6a0aea402 Signed-off-by: Tony Truong <truong@codeaurora.org>
This commit is contained in:
parent
eb3beebb57
commit
cfab905a7a
1 changed files with 11 additions and 8 deletions
|
|
@ -671,7 +671,7 @@ struct msm_pcie_dev_t {
|
|||
bool disable_pc;
|
||||
struct pci_saved_state *saved_state;
|
||||
|
||||
struct wakeup_source ws;
|
||||
struct wakeup_source *ws;
|
||||
struct icc_path *icc_path;
|
||||
|
||||
bool l0s_supported;
|
||||
|
|
@ -4934,8 +4934,8 @@ static irqreturn_t handle_wake_irq(int irq, void *data)
|
|||
schedule_work(&dev->handle_wake_work);
|
||||
} else {
|
||||
PCIE_DBG2(dev, "Wake up RC%d\n", dev->rc_idx);
|
||||
__pm_stay_awake(&dev->ws);
|
||||
__pm_relax(&dev->ws);
|
||||
__pm_stay_awake(dev->ws);
|
||||
__pm_relax(dev->ws);
|
||||
|
||||
if (dev->num_ep > 1) {
|
||||
for (i = 0; i < MAX_DEVICE_NUM; i++) {
|
||||
|
|
@ -5072,10 +5072,13 @@ static int32_t msm_pcie_irq_init(struct msm_pcie_dev_t *dev)
|
|||
|
||||
PCIE_DBG(dev, "RC%d\n", dev->rc_idx);
|
||||
|
||||
if (dev->rc_idx)
|
||||
wakeup_source_init(&dev->ws, "RC1 pcie_wakeup_source");
|
||||
else
|
||||
wakeup_source_init(&dev->ws, "RC0 pcie_wakeup_source");
|
||||
dev->ws = wakeup_source_register(pdev, dev_name(pdev));
|
||||
if (dev->ws) {
|
||||
PCIE_ERR(dev,
|
||||
"PCIe: RC%d: failed to register wakeup source\n",
|
||||
dev->rc_idx);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (dev->irq[MSM_PCIE_INT_GLOBAL_INT].num) {
|
||||
rc = devm_request_irq(pdev,
|
||||
|
|
@ -5123,7 +5126,7 @@ static void msm_pcie_irq_deinit(struct msm_pcie_dev_t *dev)
|
|||
{
|
||||
PCIE_DBG(dev, "RC%d\n", dev->rc_idx);
|
||||
|
||||
wakeup_source_trash(&dev->ws);
|
||||
wakeup_source_unregister(dev->ws);
|
||||
|
||||
if (dev->wake_n)
|
||||
disable_irq(dev->wake_n);
|
||||
|
|
|
|||
Loading…
Reference in a new issue