diff options
author | 2016-04-11 10:41:07 +0300 | |
---|---|---|
committer | 2016-04-13 08:17:18 +0300 | |
commit | e09b41010ba33a20a87472ee821fa407a5b8da36 (patch) | |
tree | d10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/drivers/video/fbdev/omap2/dss/dpi.c | |
parent | f93b97fd65072de626c074dbe099a1fff05ce060 (diff) |
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
are taken from kernel.org, and rt patch from the rt wiki download page.
During the rebasing, the following patch collided:
Force tick interrupt and get rid of softirq magic(I70131fb85).
Collisions have been removed because its logic was found on the
source already.
Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769
Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'kernel/drivers/video/fbdev/omap2/dss/dpi.c')
-rw-r--r-- | kernel/drivers/video/fbdev/omap2/dss/dpi.c | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/kernel/drivers/video/fbdev/omap2/dss/dpi.c b/kernel/drivers/video/fbdev/omap2/dss/dpi.c index f83e7b030..fb45b6432 100644 --- a/kernel/drivers/video/fbdev/omap2/dss/dpi.c +++ b/kernel/drivers/video/fbdev/omap2/dss/dpi.c @@ -32,6 +32,7 @@ #include <linux/string.h> #include <linux/of.h> #include <linux/clk.h> +#include <linux/component.h> #include <video/omapdss.h> @@ -731,7 +732,7 @@ static void dpi_init_output(struct platform_device *pdev) omapdss_register_output(out); } -static void __exit dpi_uninit_output(struct platform_device *pdev) +static void dpi_uninit_output(struct platform_device *pdev) { struct dpi_data *dpi = dpi_get_data_from_pdev(pdev); struct omap_dss_device *out = &dpi->output; @@ -775,7 +776,7 @@ static void dpi_init_output_port(struct platform_device *pdev, omapdss_register_output(out); } -static void __exit dpi_uninit_output_port(struct device_node *port) +static void dpi_uninit_output_port(struct device_node *port) { struct dpi_data *dpi = port->data; struct omap_dss_device *out = &dpi->output; @@ -783,8 +784,9 @@ static void __exit dpi_uninit_output_port(struct device_node *port) omapdss_unregister_output(out); } -static int omap_dpi_probe(struct platform_device *pdev) +static int dpi_bind(struct device *dev, struct device *master, void *data) { + struct platform_device *pdev = to_platform_device(dev); struct dpi_data *dpi; dpi = devm_kzalloc(&pdev->dev, sizeof(*dpi), GFP_KERNEL); @@ -802,16 +804,32 @@ static int omap_dpi_probe(struct platform_device *pdev) return 0; } -static int __exit omap_dpi_remove(struct platform_device *pdev) +static void dpi_unbind(struct device *dev, struct device *master, void *data) { + struct platform_device *pdev = to_platform_device(dev); + dpi_uninit_output(pdev); +} + +static const struct component_ops dpi_component_ops = { + .bind = dpi_bind, + .unbind = dpi_unbind, +}; +static int dpi_probe(struct platform_device *pdev) +{ + return component_add(&pdev->dev, &dpi_component_ops); +} + +static int dpi_remove(struct platform_device *pdev) +{ + component_del(&pdev->dev, &dpi_component_ops); return 0; } static struct platform_driver omap_dpi_driver = { - .probe = omap_dpi_probe, - .remove = __exit_p(omap_dpi_remove), + .probe = dpi_probe, + .remove = dpi_remove, .driver = { .name = "omapdss_dpi", .suppress_bind_attrs = true, @@ -823,12 +841,12 @@ int __init dpi_init_platform_driver(void) return platform_driver_register(&omap_dpi_driver); } -void __exit dpi_uninit_platform_driver(void) +void dpi_uninit_platform_driver(void) { platform_driver_unregister(&omap_dpi_driver); } -int __init dpi_init_port(struct platform_device *pdev, struct device_node *port) +int dpi_init_port(struct platform_device *pdev, struct device_node *port) { struct dpi_data *dpi; struct device_node *ep; @@ -870,7 +888,7 @@ err_datalines: return r; } -void __exit dpi_uninit_port(struct device_node *port) +void dpi_uninit_port(struct device_node *port) { struct dpi_data *dpi = port->data; |