coresight: moving PM runtime operations to core framework
[firefly-linux-kernel-4.4.55.git] / drivers / hwtracing / coresight / coresight-replicator.c
index 963ac197c2535caf202960af34490e6abd02d4cb..0ce98903992c89fc1a83769a5dfd0292ca78000c 100644 (file)
@@ -41,7 +41,6 @@ static int replicator_enable(struct coresight_device *csdev, int inport,
 {
        struct replicator_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
 
-       pm_runtime_get_sync(drvdata->dev);
        dev_info(drvdata->dev, "REPLICATOR enabled\n");
        return 0;
 }
@@ -51,7 +50,6 @@ static void replicator_disable(struct coresight_device *csdev, int inport,
 {
        struct replicator_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
 
-       pm_runtime_put(drvdata->dev);
        dev_info(drvdata->dev, "REPLICATOR disabled\n");
 }
 
@@ -127,20 +125,6 @@ out_disable_pm:
        return ret;
 }
 
-static int replicator_remove(struct platform_device *pdev)
-{
-       struct replicator_drvdata *drvdata = platform_get_drvdata(pdev);
-
-       coresight_unregister(drvdata->csdev);
-       pm_runtime_get_sync(&pdev->dev);
-       if (!IS_ERR(drvdata->atclk))
-               clk_disable_unprepare(drvdata->atclk);
-       pm_runtime_put_noidle(&pdev->dev);
-       pm_runtime_disable(&pdev->dev);
-
-       return 0;
-}
-
 #ifdef CONFIG_PM
 static int replicator_runtime_suspend(struct device *dev)
 {
@@ -175,11 +159,11 @@ static const struct of_device_id replicator_match[] = {
 
 static struct platform_driver replicator_driver = {
        .probe          = replicator_probe,
-       .remove         = replicator_remove,
        .driver         = {
                .name   = "coresight-replicator",
                .of_match_table = replicator_match,
                .pm     = &replicator_dev_pm_ops,
+               .suppress_bind_attrs = true,
        },
 };