]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/video/fbdev/omap2/dss/hdmi4.c
Merge omapdss scaling fixes
[linux-beck.git] / drivers / video / fbdev / omap2 / dss / hdmi4.c
index e1345abd41bb1a97cfff335e6749d21a68159175..6d3aa3f51c205704a41e0506149ec9f81154b074 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/clk.h>
 #include <linux/gpio.h>
 #include <linux/regulator/consumer.h>
+#include <linux/component.h>
 #include <video/omapdss.h>
 #include <sound/omap-hdmi-audio.h>
 
@@ -646,8 +647,9 @@ static int hdmi_audio_register(struct device *dev)
 }
 
 /* HDMI HW IP initialisation */
-static int omapdss_hdmihw_probe(struct platform_device *pdev)
+static int hdmi4_bind(struct device *dev, struct device *master, void *data)
 {
+       struct platform_device *pdev = to_platform_device(dev);
        int r;
        int irq;
 
@@ -713,8 +715,10 @@ err:
        return r;
 }
 
-static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
+static void hdmi4_unbind(struct device *dev, struct device *master, void *data)
 {
+       struct platform_device *pdev = to_platform_device(dev);
+
        if (hdmi.audio_pdev)
                platform_device_unregister(hdmi.audio_pdev);
 
@@ -723,7 +727,21 @@ static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
        hdmi_pll_uninit(&hdmi.pll);
 
        pm_runtime_disable(&pdev->dev);
+}
+
+static const struct component_ops hdmi4_component_ops = {
+       .bind   = hdmi4_bind,
+       .unbind = hdmi4_unbind,
+};
 
+static int hdmi4_probe(struct platform_device *pdev)
+{
+       return component_add(&pdev->dev, &hdmi4_component_ops);
+}
+
+static int hdmi4_remove(struct platform_device *pdev)
+{
+       component_del(&pdev->dev, &hdmi4_component_ops);
        return 0;
 }
 
@@ -756,8 +774,8 @@ static const struct of_device_id hdmi_of_match[] = {
 };
 
 static struct platform_driver omapdss_hdmihw_driver = {
-       .probe          = omapdss_hdmihw_probe,
-       .remove         = __exit_p(omapdss_hdmihw_remove),
+       .probe          = hdmi4_probe,
+       .remove         = hdmi4_remove,
        .driver         = {
                .name   = "omapdss_hdmi",
                .pm     = &hdmi_pm_ops,
@@ -771,7 +789,7 @@ int __init hdmi4_init_platform_driver(void)
        return platform_driver_register(&omapdss_hdmihw_driver);
 }
 
-void __exit hdmi4_uninit_platform_driver(void)
+void hdmi4_uninit_platform_driver(void)
 {
        platform_driver_unregister(&omapdss_hdmihw_driver);
 }