Skip to content

Commit

Permalink
hwspinlock: sirf: 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 SIRF 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/c921e391aa2a652d8d6ae0e4041202cec9d917e7.1578453662.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 77d99a6 commit 8f2a0dc
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions drivers/hwspinlock/sirf_hwspinlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <linux/module.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/hwspinlock.h>
Expand Down Expand Up @@ -56,7 +55,7 @@ static int sirf_hwspinlock_probe(struct platform_device *pdev)
{
struct sirf_hwspinlock *hwspin;
struct hwspinlock *hwlock;
int idx, ret;
int idx;

if (!pdev->dev.of_node)
return -ENODEV;
Expand All @@ -80,20 +79,9 @@ static int sirf_hwspinlock_probe(struct platform_device *pdev)

platform_set_drvdata(pdev, hwspin);

pm_runtime_enable(&pdev->dev);

ret = hwspin_lock_register(&hwspin->bank, &pdev->dev,
&sirf_hwspinlock_ops, 0,
HW_SPINLOCK_NUMBER);
if (ret)
goto reg_failed;

return 0;

reg_failed:
pm_runtime_disable(&pdev->dev);

return ret;
return hwspin_lock_register(&hwspin->bank, &pdev->dev,
&sirf_hwspinlock_ops, 0,
HW_SPINLOCK_NUMBER);
}

static int sirf_hwspinlock_remove(struct platform_device *pdev)
Expand All @@ -107,8 +95,6 @@ static int sirf_hwspinlock_remove(struct platform_device *pdev)
return ret;
}

pm_runtime_disable(&pdev->dev);

return 0;
}

Expand Down

0 comments on commit 8f2a0dc

Please sign in to comment.