mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	drm/omap: dss: Remove duplicated parameter to dss_mgr_(dis)connect()
The dss_mgr_connect() and dss_mgr_disconnect() functions take two omap_dss_device pointers as parameters, which are always set to the same value by all callers. Remove the duplicated pointer. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
		
							parent
							
								
									bea131966f
								
							
						
					
					
						commit
						a48bc6ac2c
					
				
					 8 changed files with 24 additions and 39 deletions
				
			
		| 
						 | 
					@ -652,7 +652,7 @@ static int dpi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dpi_init_pll(dpi);
 | 
						dpi_init_pll(dpi);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	r = dss_mgr_connect(&dpi->output, dssdev);
 | 
						r = dss_mgr_connect(dssdev);
 | 
				
			||||||
	if (r)
 | 
						if (r)
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -660,7 +660,7 @@ static int dpi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
	if (r) {
 | 
						if (r) {
 | 
				
			||||||
		DSSERR("failed to connect output to new device: %s\n",
 | 
							DSSERR("failed to connect output to new device: %s\n",
 | 
				
			||||||
				dst->name);
 | 
									dst->name);
 | 
				
			||||||
		dss_mgr_disconnect(&dpi->output, dssdev);
 | 
							dss_mgr_disconnect(dssdev);
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -670,11 +670,9 @@ static int dpi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
static void dpi_disconnect(struct omap_dss_device *dssdev,
 | 
					static void dpi_disconnect(struct omap_dss_device *dssdev,
 | 
				
			||||||
		struct omap_dss_device *dst)
 | 
							struct omap_dss_device *dst)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	omapdss_output_unset_device(dssdev);
 | 
						omapdss_output_unset_device(dssdev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dss_mgr_disconnect(&dpi->output, dssdev);
 | 
						dss_mgr_disconnect(dssdev);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const struct omap_dss_device_ops dpi_ops = {
 | 
					static const struct omap_dss_device_ops dpi_ops = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4915,7 +4915,7 @@ static int dsi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
	if (r)
 | 
						if (r)
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	r = dss_mgr_connect(&dsi->output, dssdev);
 | 
						r = dss_mgr_connect(dssdev);
 | 
				
			||||||
	if (r)
 | 
						if (r)
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4923,7 +4923,7 @@ static int dsi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
	if (r) {
 | 
						if (r) {
 | 
				
			||||||
		DSSERR("failed to connect output to new device: %s\n",
 | 
							DSSERR("failed to connect output to new device: %s\n",
 | 
				
			||||||
				dssdev->name);
 | 
									dssdev->name);
 | 
				
			||||||
		dss_mgr_disconnect(&dsi->output, dssdev);
 | 
							dss_mgr_disconnect(dssdev);
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4933,11 +4933,9 @@ static int dsi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
static void dsi_disconnect(struct omap_dss_device *dssdev,
 | 
					static void dsi_disconnect(struct omap_dss_device *dssdev,
 | 
				
			||||||
		struct omap_dss_device *dst)
 | 
							struct omap_dss_device *dst)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct dsi_data *dsi = to_dsi_data(dssdev);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	omapdss_output_unset_device(dssdev);
 | 
						omapdss_output_unset_device(dssdev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dss_mgr_disconnect(&dsi->output, dssdev);
 | 
						dss_mgr_disconnect(dssdev);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const struct omap_dss_device_ops dsi_ops = {
 | 
					static const struct omap_dss_device_ops dsi_ops = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -458,7 +458,7 @@ static int hdmi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
	if (r)
 | 
						if (r)
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	r = dss_mgr_connect(&hdmi->output, dssdev);
 | 
						r = dss_mgr_connect(dssdev);
 | 
				
			||||||
	if (r)
 | 
						if (r)
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -466,7 +466,7 @@ static int hdmi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
	if (r) {
 | 
						if (r) {
 | 
				
			||||||
		DSSERR("failed to connect output to new device: %s\n",
 | 
							DSSERR("failed to connect output to new device: %s\n",
 | 
				
			||||||
				dst->name);
 | 
									dst->name);
 | 
				
			||||||
		dss_mgr_disconnect(&hdmi->output, dssdev);
 | 
							dss_mgr_disconnect(dssdev);
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -476,11 +476,9 @@ static int hdmi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
static void hdmi_disconnect(struct omap_dss_device *dssdev,
 | 
					static void hdmi_disconnect(struct omap_dss_device *dssdev,
 | 
				
			||||||
		struct omap_dss_device *dst)
 | 
							struct omap_dss_device *dst)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct omap_hdmi *hdmi = dssdev_to_hdmi(dssdev);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	omapdss_output_unset_device(dssdev);
 | 
						omapdss_output_unset_device(dssdev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dss_mgr_disconnect(&hdmi->output, dssdev);
 | 
						dss_mgr_disconnect(dssdev);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int hdmi_read_edid(struct omap_dss_device *dssdev,
 | 
					static int hdmi_read_edid(struct omap_dss_device *dssdev,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -461,7 +461,7 @@ static int hdmi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
	if (r)
 | 
						if (r)
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	r = dss_mgr_connect(&hdmi->output, dssdev);
 | 
						r = dss_mgr_connect(dssdev);
 | 
				
			||||||
	if (r)
 | 
						if (r)
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -469,7 +469,7 @@ static int hdmi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
	if (r) {
 | 
						if (r) {
 | 
				
			||||||
		DSSERR("failed to connect output to new device: %s\n",
 | 
							DSSERR("failed to connect output to new device: %s\n",
 | 
				
			||||||
				dst->name);
 | 
									dst->name);
 | 
				
			||||||
		dss_mgr_disconnect(&hdmi->output, dssdev);
 | 
							dss_mgr_disconnect(dssdev);
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -479,11 +479,9 @@ static int hdmi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
static void hdmi_disconnect(struct omap_dss_device *dssdev,
 | 
					static void hdmi_disconnect(struct omap_dss_device *dssdev,
 | 
				
			||||||
		struct omap_dss_device *dst)
 | 
							struct omap_dss_device *dst)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct omap_hdmi *hdmi = dssdev_to_hdmi(dssdev);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	omapdss_output_unset_device(dssdev);
 | 
						omapdss_output_unset_device(dssdev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dss_mgr_disconnect(&hdmi->output, dssdev);
 | 
						dss_mgr_disconnect(dssdev);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int hdmi_read_edid(struct omap_dss_device *dssdev,
 | 
					static int hdmi_read_edid(struct omap_dss_device *dssdev,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -587,10 +587,8 @@ int dss_install_mgr_ops(struct dss_device *dss,
 | 
				
			||||||
			struct omap_drm_private *priv);
 | 
								struct omap_drm_private *priv);
 | 
				
			||||||
void dss_uninstall_mgr_ops(struct dss_device *dss);
 | 
					void dss_uninstall_mgr_ops(struct dss_device *dss);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int dss_mgr_connect(struct omap_dss_device *dssdev,
 | 
					int dss_mgr_connect(struct omap_dss_device *dssdev);
 | 
				
			||||||
		    struct omap_dss_device *dst);
 | 
					void dss_mgr_disconnect(struct omap_dss_device *dssdev);
 | 
				
			||||||
void dss_mgr_disconnect(struct omap_dss_device *dssdev,
 | 
					 | 
				
			||||||
			struct omap_dss_device *dst);
 | 
					 | 
				
			||||||
void dss_mgr_set_timings(struct omap_dss_device *dssdev,
 | 
					void dss_mgr_set_timings(struct omap_dss_device *dssdev,
 | 
				
			||||||
		const struct videomode *vm);
 | 
							const struct videomode *vm);
 | 
				
			||||||
void dss_mgr_set_lcd_config(struct omap_dss_device *dssdev,
 | 
					void dss_mgr_set_lcd_config(struct omap_dss_device *dssdev,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -109,18 +109,17 @@ void dss_uninstall_mgr_ops(struct dss_device *dss)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
EXPORT_SYMBOL(dss_uninstall_mgr_ops);
 | 
					EXPORT_SYMBOL(dss_uninstall_mgr_ops);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int dss_mgr_connect(struct omap_dss_device *dssdev, struct omap_dss_device *dst)
 | 
					int dss_mgr_connect(struct omap_dss_device *dssdev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	return dssdev->dss->mgr_ops->connect(dssdev->dss->mgr_ops_priv,
 | 
						return dssdev->dss->mgr_ops->connect(dssdev->dss->mgr_ops_priv,
 | 
				
			||||||
					     dssdev->dispc_channel, dst);
 | 
										     dssdev->dispc_channel, dssdev);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
EXPORT_SYMBOL(dss_mgr_connect);
 | 
					EXPORT_SYMBOL(dss_mgr_connect);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void dss_mgr_disconnect(struct omap_dss_device *dssdev,
 | 
					void dss_mgr_disconnect(struct omap_dss_device *dssdev)
 | 
				
			||||||
			struct omap_dss_device *dst)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	dssdev->dss->mgr_ops->disconnect(dssdev->dss->mgr_ops_priv,
 | 
						dssdev->dss->mgr_ops->disconnect(dssdev->dss->mgr_ops_priv,
 | 
				
			||||||
					 dssdev->dispc_channel, dst);
 | 
										 dssdev->dispc_channel, dssdev);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
EXPORT_SYMBOL(dss_mgr_disconnect);
 | 
					EXPORT_SYMBOL(dss_mgr_disconnect);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -281,7 +281,7 @@ static int sdi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
	if (r)
 | 
						if (r)
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	r = dss_mgr_connect(&sdi->output, dssdev);
 | 
						r = dss_mgr_connect(dssdev);
 | 
				
			||||||
	if (r)
 | 
						if (r)
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -289,7 +289,7 @@ static int sdi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
	if (r) {
 | 
						if (r) {
 | 
				
			||||||
		DSSERR("failed to connect output to new device: %s\n",
 | 
							DSSERR("failed to connect output to new device: %s\n",
 | 
				
			||||||
				dst->name);
 | 
									dst->name);
 | 
				
			||||||
		dss_mgr_disconnect(&sdi->output, dssdev);
 | 
							dss_mgr_disconnect(dssdev);
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -299,11 +299,9 @@ static int sdi_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
static void sdi_disconnect(struct omap_dss_device *dssdev,
 | 
					static void sdi_disconnect(struct omap_dss_device *dssdev,
 | 
				
			||||||
		struct omap_dss_device *dst)
 | 
							struct omap_dss_device *dst)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct sdi_device *sdi = dssdev_to_sdi(dssdev);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	omapdss_output_unset_device(dssdev);
 | 
						omapdss_output_unset_device(dssdev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dss_mgr_disconnect(&sdi->output, dssdev);
 | 
						dss_mgr_disconnect(dssdev);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const struct omap_dss_device_ops sdi_ops = {
 | 
					static const struct omap_dss_device_ops sdi_ops = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -720,7 +720,7 @@ static int venc_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
	if (r)
 | 
						if (r)
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	r = dss_mgr_connect(&venc->output, dssdev);
 | 
						r = dss_mgr_connect(dssdev);
 | 
				
			||||||
	if (r)
 | 
						if (r)
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -728,7 +728,7 @@ static int venc_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
	if (r) {
 | 
						if (r) {
 | 
				
			||||||
		DSSERR("failed to connect output to new device: %s\n",
 | 
							DSSERR("failed to connect output to new device: %s\n",
 | 
				
			||||||
				dst->name);
 | 
									dst->name);
 | 
				
			||||||
		dss_mgr_disconnect(&venc->output, dssdev);
 | 
							dss_mgr_disconnect(dssdev);
 | 
				
			||||||
		return r;
 | 
							return r;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -738,11 +738,9 @@ static int venc_connect(struct omap_dss_device *dssdev,
 | 
				
			||||||
static void venc_disconnect(struct omap_dss_device *dssdev,
 | 
					static void venc_disconnect(struct omap_dss_device *dssdev,
 | 
				
			||||||
		struct omap_dss_device *dst)
 | 
							struct omap_dss_device *dst)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct venc_device *venc = dssdev_to_venc(dssdev);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	omapdss_output_unset_device(dssdev);
 | 
						omapdss_output_unset_device(dssdev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dss_mgr_disconnect(&venc->output, dssdev);
 | 
						dss_mgr_disconnect(dssdev);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const struct omap_dss_device_ops venc_ops = {
 | 
					static const struct omap_dss_device_ops venc_ops = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue