Commit 79abca2b authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Sam Ravnborg
Browse files

drm/mipi-dsi: Make remove callback return void



All implementations return 0 and the return value of mipi_dsi_drv_remove()
is ignored anyhow.

So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour.

Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220708094922.1408248-4-u.kleine-koenig@pengutronix.de
parent 1fd452c4
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -735,14 +735,12 @@ static int chipone_i2c_probe(struct i2c_client *client,
	return chipone_dsi_host_attach(icn);
}

static int chipone_dsi_remove(struct mipi_dsi_device *dsi)
static void chipone_dsi_remove(struct mipi_dsi_device *dsi)
{
	struct chipone *icn = mipi_dsi_get_drvdata(dsi);

	mipi_dsi_detach(dsi);
	drm_bridge_remove(&icn->bridge);

	return 0;
}

static const struct of_device_id chipone_of_match[] = {
+1 −3
Original line number Diff line number Diff line
@@ -241,14 +241,12 @@ static int tc358762_probe(struct mipi_dsi_device *dsi)
	return ret;
}

static int tc358762_remove(struct mipi_dsi_device *dsi)
static void tc358762_remove(struct mipi_dsi_device *dsi)
{
	struct tc358762 *ctx = mipi_dsi_get_drvdata(dsi);

	mipi_dsi_detach(dsi);
	drm_bridge_remove(&ctx->bridge);

	return 0;
}

static const struct of_device_id tc358762_of_match[] = {
+1 −3
Original line number Diff line number Diff line
@@ -381,14 +381,12 @@ static int tc358764_probe(struct mipi_dsi_device *dsi)
	return ret;
}

static int tc358764_remove(struct mipi_dsi_device *dsi)
static void tc358764_remove(struct mipi_dsi_device *dsi)
{
	struct tc358764 *ctx = mipi_dsi_get_drvdata(dsi);

	mipi_dsi_detach(dsi);
	drm_bridge_remove(&ctx->bridge);

	return 0;
}

static const struct of_device_id tc358764_of_match[] = {
+3 −1
Original line number Diff line number Diff line
@@ -1236,7 +1236,9 @@ static int mipi_dsi_drv_remove(struct device *dev)
	struct mipi_dsi_driver *drv = to_mipi_dsi_driver(dev->driver);
	struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev);

	return drv->remove(dsi);
	drv->remove(dsi);

	return 0;
}

static void mipi_dsi_drv_shutdown(struct device *dev)
+1 −3
Original line number Diff line number Diff line
@@ -321,7 +321,7 @@ static int tm5p5_nt35596_probe(struct mipi_dsi_device *dsi)
	return 0;
}

static int tm5p5_nt35596_remove(struct mipi_dsi_device *dsi)
static void tm5p5_nt35596_remove(struct mipi_dsi_device *dsi)
{
	struct tm5p5_nt35596 *ctx = mipi_dsi_get_drvdata(dsi);
	int ret;
@@ -332,8 +332,6 @@ static int tm5p5_nt35596_remove(struct mipi_dsi_device *dsi)
			"Failed to detach from DSI host: %d\n", ret);

	drm_panel_remove(&ctx->panel);

	return 0;
}

static const struct of_device_id tm5p5_nt35596_of_match[] = {
Loading