Commit 442cbc86 authored by Tomi Valkeinen's avatar Tomi Valkeinen

drm/omap: dsi: drop useless channel checks

A DSI peripheral can have virtual channel ID of 0-3. This should be
always the case, and there's no need in the driver to validate the
channel.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201215104657.802264-64-tomi.valkeinen@ti.com
parent d843314e
...@@ -3899,9 +3899,6 @@ static int dsi_update_channel(struct omap_dss_device *dssdev, int channel) ...@@ -3899,9 +3899,6 @@ static int dsi_update_channel(struct omap_dss_device *dssdev, int channel)
struct dsi_data *dsi = to_dsi_data(dssdev); struct dsi_data *dsi = to_dsi_data(dssdev);
int r; int r;
if (channel > 3)
return -EINVAL;
dsi_bus_lock(dsi); dsi_bus_lock(dsi);
if (!dsi->video_enabled) { if (!dsi->video_enabled) {
...@@ -5065,12 +5062,8 @@ static int omap_dsi_host_attach(struct mipi_dsi_host *host, ...@@ -5065,12 +5062,8 @@ static int omap_dsi_host_attach(struct mipi_dsi_host *host,
struct mipi_dsi_device *client) struct mipi_dsi_device *client)
{ {
struct dsi_data *dsi = host_to_omap(host); struct dsi_data *dsi = host_to_omap(host);
unsigned int channel = client->channel;
int r; int r;
if (channel > 3)
return -EINVAL;
if (dsi->dsidev) { if (dsi->dsidev) {
DSSERR("dsi client already attached\n"); DSSERR("dsi client already attached\n");
return -EBUSY; return -EBUSY;
...@@ -5120,10 +5113,6 @@ static int omap_dsi_host_detach(struct mipi_dsi_host *host, ...@@ -5120,10 +5113,6 @@ static int omap_dsi_host_detach(struct mipi_dsi_host *host,
struct mipi_dsi_device *client) struct mipi_dsi_device *client)
{ {
struct dsi_data *dsi = host_to_omap(host); struct dsi_data *dsi = host_to_omap(host);
unsigned int channel = client->channel;
if (channel > 3)
return -EINVAL;
if (WARN_ON(dsi->dsidev != client)) if (WARN_ON(dsi->dsidev != client))
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment