Merge tag 'kvm-s390-next-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / drivers / media / platform / qcom / venus / core.c
index 776d2bae697934f02d3ce70fa1adfe4c1d35966a..41eef376eb2da69dfa710a1d5113b123998e1b4f 100644 (file)
@@ -76,7 +76,7 @@ static void venus_sys_error_handler(struct work_struct *work)
        hfi_core_deinit(core, true);
        hfi_destroy(core);
        mutex_lock(&core->lock);
-       venus_shutdown(&core->dev_fw);
+       venus_shutdown(core->dev);
 
        pm_runtime_put_sync(core->dev);
 
@@ -84,7 +84,7 @@ static void venus_sys_error_handler(struct work_struct *work)
 
        pm_runtime_get_sync(core->dev);
 
-       ret |= venus_boot(core->dev, &core->dev_fw, core->res->fwname);
+       ret |= venus_boot(core->dev, core->res->fwname);
 
        ret |= hfi_core_resume(core, true);
 
@@ -137,7 +137,7 @@ static int venus_clks_enable(struct venus_core *core)
 
        return 0;
 err:
-       while (--i)
+       while (i--)
                clk_disable_unprepare(core->clks[i]);
 
        return ret;
@@ -207,7 +207,7 @@ static int venus_probe(struct platform_device *pdev)
        if (ret < 0)
                goto err_runtime_disable;
 
-       ret = venus_boot(dev, &core->dev_fw, core->res->fwname);
+       ret = venus_boot(dev, core->res->fwname);
        if (ret)
                goto err_runtime_disable;
 
@@ -238,7 +238,7 @@ err_dev_unregister:
 err_core_deinit:
        hfi_core_deinit(core, false);
 err_venus_shutdown:
-       venus_shutdown(&core->dev_fw);
+       venus_shutdown(dev);
 err_runtime_disable:
        pm_runtime_set_suspended(dev);
        pm_runtime_disable(dev);
@@ -259,7 +259,7 @@ static int venus_remove(struct platform_device *pdev)
        WARN_ON(ret);
 
        hfi_destroy(core);
-       venus_shutdown(&core->dev_fw);
+       venus_shutdown(dev);
        of_platform_depopulate(dev);
 
        pm_runtime_put_sync(dev);
@@ -270,8 +270,7 @@ static int venus_remove(struct platform_device *pdev)
        return ret;
 }
 
-#ifdef CONFIG_PM
-static int venus_runtime_suspend(struct device *dev)
+static __maybe_unused int venus_runtime_suspend(struct device *dev)
 {
        struct venus_core *core = dev_get_drvdata(dev);
        int ret;
@@ -283,7 +282,7 @@ static int venus_runtime_suspend(struct device *dev)
        return ret;
 }
 
-static int venus_runtime_resume(struct device *dev)
+static __maybe_unused int venus_runtime_resume(struct device *dev)
 {
        struct venus_core *core = dev_get_drvdata(dev);
        int ret;
@@ -302,7 +301,6 @@ err_clks_disable:
        venus_clks_disable(core);
        return ret;
 }
-#endif
 
 static const struct dev_pm_ops venus_pm_ops = {
        SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,