drm: omapdrm: dss: Store dispc ops in dss_device structure
Remove the global dispc ops variable by storing it in the dss_device
structure.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
index 8019cc9..aae6037 100644
--- a/drivers/gpu/drm/omapdrm/dss/dispc.c
+++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
@@ -4622,7 +4622,7 @@ static int dispc_bind(struct device *dev, struct device *master, void *data)
dispc_runtime_put();
- dispc_set_ops(&dispc_ops);
+ dss->dispc_ops = &dispc_ops;
dispc.debugfs = dss_debugfs_create_file(dss, "dispc", dispc_dump_regs,
&dispc);
@@ -4637,9 +4637,11 @@ static int dispc_bind(struct device *dev, struct device *master, void *data)
static void dispc_unbind(struct device *dev, struct device *master,
void *data)
{
+ struct dss_device *dss = dispc.dss;
+
dss_debugfs_remove_file(dispc.debugfs);
- dispc_set_ops(NULL);
+ dss->dispc_ops = NULL;
pm_runtime_disable(dev);