These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / video / fbdev / omap2 / dss / dsi.c
index 28b0bc1..b3606de 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/component.h>
 
 #include <video/omapdss.h>
 #include <video/mipi_display.h>
@@ -5274,8 +5275,9 @@ static int dsi_init_pll_data(struct platform_device *dsidev)
 }
 
 /* DSI1 HW IP initialisation */
-static int omap_dsihw_probe(struct platform_device *dsidev)
+static int dsi_bind(struct device *dev, struct device *master, void *data)
 {
+       struct platform_device *dsidev = to_platform_device(dev);
        u32 rev;
        int r, i;
        struct dsi_data *dsi;
@@ -5484,8 +5486,9 @@ err_runtime_get:
        return r;
 }
 
-static int __exit omap_dsihw_remove(struct platform_device *dsidev)
+static void dsi_unbind(struct device *dev, struct device *master, void *data)
 {
+       struct platform_device *dsidev = to_platform_device(dev);
        struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
 
        of_platform_depopulate(&dsidev->dev);
@@ -5502,7 +5505,21 @@ static int __exit omap_dsihw_remove(struct platform_device *dsidev)
                regulator_disable(dsi->vdds_dsi_reg);
                dsi->vdds_dsi_enabled = false;
        }
+}
+
+static const struct component_ops dsi_component_ops = {
+       .bind   = dsi_bind,
+       .unbind = dsi_unbind,
+};
 
+static int dsi_probe(struct platform_device *pdev)
+{
+       return component_add(&pdev->dev, &dsi_component_ops);
+}
+
+static int dsi_remove(struct platform_device *pdev)
+{
+       component_del(&pdev->dev, &dsi_component_ops);
        return 0;
 }
 
@@ -5569,8 +5586,8 @@ static const struct of_device_id dsi_of_match[] = {
 };
 
 static struct platform_driver omap_dsihw_driver = {
-       .probe          = omap_dsihw_probe,
-       .remove         = __exit_p(omap_dsihw_remove),
+       .probe          = dsi_probe,
+       .remove         = dsi_remove,
        .driver         = {
                .name   = "omapdss_dsi",
                .pm     = &dsi_pm_ops,
@@ -5584,7 +5601,7 @@ int __init dsi_init_platform_driver(void)
        return platform_driver_register(&omap_dsihw_driver);
 }
 
-void __exit dsi_uninit_platform_driver(void)
+void dsi_uninit_platform_driver(void)
 {
        platform_driver_unregister(&omap_dsihw_driver);
 }