OMAPDSS: set suppress_bind_attrs
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 16 Oct 2014 06:54:25 +0000 (09:54 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 22 Oct 2014 08:07:07 +0000 (11:07 +0300)
omapdss drivers cannot handle devices being unbound while the devices
are part of a connected display pipeline. Module refcounts are used to
prevent unloading the modules, but one can still manually unbind the
devices via sysfs, causing crash.

Set suppress_bind_attrs to disable the bind/unbind support via sysfs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
22 files changed:
drivers/video/fbdev/omap2/displays-new/connector-analog-tv.c
drivers/video/fbdev/omap2/displays-new/connector-dvi.c
drivers/video/fbdev/omap2/displays-new/connector-hdmi.c
drivers/video/fbdev/omap2/displays-new/encoder-tfp410.c
drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
drivers/video/fbdev/omap2/displays-new/panel-dpi.c
drivers/video/fbdev/omap2/displays-new/panel-dsi-cm.c
drivers/video/fbdev/omap2/displays-new/panel-lgphilips-lb035q02.c
drivers/video/fbdev/omap2/displays-new/panel-nec-nl8048hl11.c
drivers/video/fbdev/omap2/displays-new/panel-sharp-ls037v7dw01.c
drivers/video/fbdev/omap2/displays-new/panel-sony-acx565akm.c
drivers/video/fbdev/omap2/displays-new/panel-tpo-td028ttec1.c
drivers/video/fbdev/omap2/displays-new/panel-tpo-td043mtea1.c
drivers/video/fbdev/omap2/dss/dispc.c
drivers/video/fbdev/omap2/dss/dpi.c
drivers/video/fbdev/omap2/dss/dsi.c
drivers/video/fbdev/omap2/dss/dss.c
drivers/video/fbdev/omap2/dss/hdmi4.c
drivers/video/fbdev/omap2/dss/hdmi5.c
drivers/video/fbdev/omap2/dss/rfbi.c
drivers/video/fbdev/omap2/dss/sdi.c
drivers/video/fbdev/omap2/dss/venc.c

index 5ee3b55..05be3ad 100644 (file)
@@ -308,6 +308,7 @@ static struct platform_driver tvc_connector_driver = {
                .name   = "connector-analog-tv",
                .owner  = THIS_MODULE,
                .of_match_table = tvc_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index 74de2bc..2dfb6e5 100644 (file)
@@ -391,6 +391,7 @@ static struct platform_driver dvi_connector_driver = {
                .name   = "connector-dvi",
                .owner  = THIS_MODULE,
                .of_match_table = dvic_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index 131c6e2..7b25967 100644 (file)
@@ -437,6 +437,7 @@ static struct platform_driver hdmi_connector_driver = {
                .name   = "connector-hdmi",
                .owner  = THIS_MODULE,
                .of_match_table = hdmic_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index b4e9a42..47ee7cd 100644 (file)
@@ -298,6 +298,7 @@ static struct platform_driver tfp410_driver = {
                .name   = "tfp410",
                .owner  = THIS_MODULE,
                .of_match_table = tfp410_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index c891d8f..c4abd56 100644 (file)
@@ -461,6 +461,7 @@ static struct platform_driver tpd_driver = {
                .name   = "tpd12s015",
                .owner  = THIS_MODULE,
                .of_match_table = tpd_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index 3636b61..a9c3dcf 100644 (file)
@@ -327,6 +327,7 @@ static struct platform_driver panel_dpi_driver = {
                .name = "panel-dpi",
                .owner = THIS_MODULE,
                .of_match_table = panel_dpi_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index d6f14e8..899cb1a 100644 (file)
@@ -1378,6 +1378,7 @@ static struct platform_driver dsicm_driver = {
                .name = "panel-dsi-cm",
                .owner = THIS_MODULE,
                .of_match_table = dsicm_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index cc5b512..27d4fcf 100644 (file)
@@ -394,6 +394,7 @@ static struct spi_driver lb035q02_spi_driver = {
                .name   = "panel_lgphilips_lb035q02",
                .owner  = THIS_MODULE,
                .of_match_table = lb035q02_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index 3595f11..ccf3f4f 100644 (file)
@@ -424,6 +424,7 @@ static struct spi_driver nec_8048_driver = {
                .owner  = THIS_MODULE,
                .pm     = NEC_8048_PM_OPS,
                .of_match_table = nec_8048_of_match,
+               .suppress_bind_attrs = true,
        },
        .probe  = nec_8048_probe,
        .remove = nec_8048_remove,
index f1f72ce..234142c 100644 (file)
@@ -410,6 +410,7 @@ static struct platform_driver sharp_ls_driver = {
                .name = "panel-sharp-ls037v7dw01",
                .owner = THIS_MODULE,
                .of_match_table = sharp_ls_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index 617f8d2..337ccc5 100644 (file)
@@ -904,6 +904,7 @@ static struct spi_driver acx565akm_driver = {
                .name   = "acx565akm",
                .owner  = THIS_MODULE,
                .of_match_table = acx565akm_of_match,
+               .suppress_bind_attrs = true,
        },
        .probe  = acx565akm_probe,
        .remove = acx565akm_remove,
index 728808b..fbba0b8 100644 (file)
@@ -500,6 +500,7 @@ static struct spi_driver td028ttec1_spi_driver = {
                .name   = "panel-tpo-td028ttec1",
                .owner  = THIS_MODULE,
                .of_match_table = td028ttec1_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index de78ab0..5aba76b 100644 (file)
@@ -673,6 +673,7 @@ static struct spi_driver tpo_td043_spi_driver = {
                .owner  = THIS_MODULE,
                .pm     = &tpo_td043_spi_pm,
                .of_match_table = tpo_td043_of_match,
+               .suppress_bind_attrs = true,
        },
        .probe  = tpo_td043_probe,
        .remove = tpo_td043_remove,
index be053aa..e67976b 100644 (file)
@@ -3843,6 +3843,7 @@ static struct platform_driver omap_dispchw_driver = {
                .owner  = THIS_MODULE,
                .pm     = &dispc_pm_ops,
                .of_match_table = dispc_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index 9368972..4a3363d 100644 (file)
@@ -720,6 +720,7 @@ static struct platform_driver omap_dpi_driver = {
        .driver         = {
                .name   = "omapdss_dpi",
                .owner  = THIS_MODULE,
+               .suppress_bind_attrs = true,
        },
 };
 
index b6f6ae1..947bd7b 100644 (file)
@@ -5754,6 +5754,7 @@ static struct platform_driver omap_dsihw_driver = {
                .owner  = THIS_MODULE,
                .pm     = &dsi_pm_ops,
                .of_match_table = dsi_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index 6daeb7e..14bcd6c 100644 (file)
@@ -966,6 +966,7 @@ static struct platform_driver omap_dsshw_driver = {
                .owner  = THIS_MODULE,
                .pm     = &dss_pm_ops,
                .of_match_table = dss_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index 6a8550c..9a8713c 100644 (file)
@@ -781,6 +781,7 @@ static struct platform_driver omapdss_hdmihw_driver = {
                .owner  = THIS_MODULE,
                .pm     = &hdmi_pm_ops,
                .of_match_table = hdmi_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index 32d02ec..169b764 100644 (file)
@@ -806,6 +806,7 @@ static struct platform_driver omapdss_hdmihw_driver = {
                .owner  = THIS_MODULE,
                .pm     = &hdmi_pm_ops,
                .of_match_table = hdmi_of_match,
+               .suppress_bind_attrs = true,
        },
 };
 
index c8a81a2..878273f 100644 (file)
@@ -1044,6 +1044,7 @@ static struct platform_driver omap_rfbihw_driver = {
                .name   = "omapdss_rfbi",
                .owner  = THIS_MODULE,
                .pm     = &rfbi_pm_ops,
+               .suppress_bind_attrs = true,
        },
 };
 
index 911dcc9..4c9c46d 100644 (file)
@@ -377,6 +377,7 @@ static struct platform_driver omap_sdi_driver = {
        .driver         = {
                .name   = "omapdss_sdi",
                .owner  = THIS_MODULE,
+               .suppress_bind_attrs = true,
        },
 };
 
index 21d8111..d077d8a 100644 (file)
@@ -966,6 +966,7 @@ static struct platform_driver omap_venchw_driver = {
                .owner  = THIS_MODULE,
                .pm     = &venc_pm_ops,
                .of_match_table = venc_of_match,
+               .suppress_bind_attrs = true,
        },
 };