mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
soc/tegra: fuse: Use device-specific instance in suspend/resume
Avoid using the default fuse instance in suspend/resume callbacks, as it always runs the suspend/resume callbacks for the default instance rather than the device’s own. Get the correct fuse instance by using `dev_get_drvdata()`. Signed-off-by: Kartik Rajput <kkartik@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
43e7ae814c
commit
863515d1eb
|
|
@ -259,6 +259,7 @@ static int tegra_fuse_probe(struct platform_device *pdev)
|
|||
|
||||
static int __maybe_unused tegra_fuse_runtime_resume(struct device *dev)
|
||||
{
|
||||
struct tegra_fuse *fuse = dev_get_drvdata(dev);
|
||||
int err;
|
||||
|
||||
err = clk_prepare_enable(fuse->clk);
|
||||
|
|
@ -272,6 +273,8 @@ static int __maybe_unused tegra_fuse_runtime_resume(struct device *dev)
|
|||
|
||||
static int __maybe_unused tegra_fuse_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct tegra_fuse *fuse = dev_get_drvdata(dev);
|
||||
|
||||
clk_disable_unprepare(fuse->clk);
|
||||
|
||||
return 0;
|
||||
|
|
@ -279,6 +282,7 @@ static int __maybe_unused tegra_fuse_runtime_suspend(struct device *dev)
|
|||
|
||||
static int __maybe_unused tegra_fuse_suspend(struct device *dev)
|
||||
{
|
||||
struct tegra_fuse *fuse = dev_get_drvdata(dev);
|
||||
int ret;
|
||||
|
||||
/*
|
||||
|
|
@ -295,6 +299,7 @@ static int __maybe_unused tegra_fuse_suspend(struct device *dev)
|
|||
|
||||
static int __maybe_unused tegra_fuse_resume(struct device *dev)
|
||||
{
|
||||
struct tegra_fuse *fuse = dev_get_drvdata(dev);
|
||||
int ret = 0;
|
||||
|
||||
if (fuse->soc->clk_suspend_on)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user