@@ -379,7 +379,7 @@ static void kmb_drm_unload(struct device *dev)
dev_set_drvdata(dev, NULL);
/* Unregister DSI host */
- mipi_dsi_host_unregister(dsi_host);
+ dsi_host_unregister();
}
static int kmb_probe(struct platform_device *pdev)
@@ -420,7 +420,7 @@ static int kmb_probe(struct platform_device *pdev)
dev_set_drvdata(dev, drm);
kmb_setup_mode_config(drm);
- dev_set_drvdata(dev, drm);
+ dev_set_drvdata(dev, drm);
/* Load driver */
ret = kmb_load(drm, 0);
@@ -461,7 +461,7 @@ static int kmb_probe(struct platform_device *pdev)
drm_mode_config_cleanup(drm);
dev_set_drvdata(dev, NULL);
drm_dev_put(drm);
- mipi_dsi_host_unregister(dsi_host);
+ dsi_host_unregister();
return ret;
}
@@ -11,7 +11,6 @@
#define KMB_MAX_WIDTH 16384 /*max width in pixels */
#define KMB_MAX_HEIGHT 16384 /*max height in pixels */
-extern struct mipi_dsi_host *dsi_host;
struct kmb_drm_private {
struct drm_device drm;
void __iomem *lcd_mmio;
@@ -59,7 +59,7 @@
#define PLL_M_MAX 623
#define PLL_FVCO_MAX 1250
-struct mipi_dsi_host *dsi_host;
+static struct mipi_dsi_host *dsi_host;
static struct mipi_dsi_device *dsi_device;
/*
@@ -337,8 +337,13 @@ struct drm_bridge *kmb_dsi_host_bridge_init(struct device *dev)
return bridge;
}
+void dsi_host_unregister(void)
+{
+ mipi_dsi_host_unregister(dsi_host);
+}
+
u32 mipi_get_datatype_params(u32 data_type, u32 data_mode,
- struct mipi_data_type_params *params)
+ struct mipi_data_type_params *params)
{
struct mipi_data_type_params data_type_parameters;
@@ -313,6 +313,7 @@ struct drm_bridge *kmb_dsi_host_bridge_init(struct device *dev);
int kmb_dsi_init(struct drm_device *dev, struct drm_bridge *bridge);
void kmb_plane_destroy(struct drm_plane *plane);
void mipi_tx_handle_irqs(struct kmb_drm_private *dev_p);
+void dsi_host_unregister(void);
#define to_kmb_connector(x) container_of(x, struct kmb_connector, base)
#define to_kmb_host(x) container_of(x, struct kmb_dsi_host, base)