Skip to content

Commit

Permalink
hwspinlock: qcom: Remove redundant PM runtime functions
Browse files Browse the repository at this point in the history
Since the hwspinlock core has changed the PM runtime to be optional, and
the Qualcomm hardware spinlock has no pm runtime requirement, thus remove
these redundant PM runtime functions.

Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Link: https://lore.kernel.org/r/e0bb751feb7af709f92e52a07d0e8ebcf1ee44ff.1578452735.git.baolin.wang7@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
  • Loading branch information
Baolin Wang authored and Bjorn Andersson committed Jan 22, 2020
1 parent d482448 commit 98ec52a
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions drivers/hwspinlock/qcom_hwspinlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>

#include "hwspinlock_internal.h"
Expand Down Expand Up @@ -122,14 +121,8 @@ static int qcom_hwspinlock_probe(struct platform_device *pdev)
regmap, field);
}

pm_runtime_enable(&pdev->dev);

ret = hwspin_lock_register(bank, &pdev->dev, &qcom_hwspinlock_ops,
0, QCOM_MUTEX_NUM_LOCKS);
if (ret)
pm_runtime_disable(&pdev->dev);

return ret;
return hwspin_lock_register(bank, &pdev->dev, &qcom_hwspinlock_ops,
0, QCOM_MUTEX_NUM_LOCKS);
}

static int qcom_hwspinlock_remove(struct platform_device *pdev)
Expand All @@ -143,8 +136,6 @@ static int qcom_hwspinlock_remove(struct platform_device *pdev)
return ret;
}

pm_runtime_disable(&pdev->dev);

return 0;
}

Expand Down

0 comments on commit 98ec52a

Please sign in to comment.