aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-07-21 06:22:26 -0400
committerThierry Reding <treding@nvidia.com>2014-07-22 03:06:16 -0400
commit371c359f83b4d19d2688e975a07dc44add307e24 (patch)
tree1e3d4e229d06f1fde121ee06e2423aa8b156cd57
parent102932b0e474bb33061e88bcf5d83e66f10c1da2 (diff)
drm/dsi: Make mipi_dsi_dcs_write() return ssize_t
This function returns the value of the struct mipi_dsi_host_ops' .transfer() so make sure the return types are consistent. Acked-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/gpu/drm/drm_mipi_dsi.c4
-rw-r--r--drivers/gpu/drm/panel/panel-s6e8aa0.c4
-rw-r--r--include/drm/drm_mipi_dsi.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index e633df2f68d8..6d2fd2077dae 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -205,8 +205,8 @@ EXPORT_SYMBOL(mipi_dsi_detach);
205 * @data: pointer to the command followed by parameters 205 * @data: pointer to the command followed by parameters
206 * @len: length of @data 206 * @len: length of @data
207 */ 207 */
208int mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, unsigned int channel, 208ssize_t mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, unsigned int channel,
209 const void *data, size_t len) 209 const void *data, size_t len)
210{ 210{
211 const struct mipi_dsi_host_ops *ops = dsi->host->ops; 211 const struct mipi_dsi_host_ops *ops = dsi->host->ops;
212 struct mipi_dsi_msg msg = { 212 struct mipi_dsi_msg msg = {
diff --git a/drivers/gpu/drm/panel/panel-s6e8aa0.c b/drivers/gpu/drm/panel/panel-s6e8aa0.c
index 06e57a26db7a..beb43492b649 100644
--- a/drivers/gpu/drm/panel/panel-s6e8aa0.c
+++ b/drivers/gpu/drm/panel/panel-s6e8aa0.c
@@ -133,14 +133,14 @@ static int s6e8aa0_clear_error(struct s6e8aa0 *ctx)
133static void s6e8aa0_dcs_write(struct s6e8aa0 *ctx, const void *data, size_t len) 133static void s6e8aa0_dcs_write(struct s6e8aa0 *ctx, const void *data, size_t len)
134{ 134{
135 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); 135 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
136 int ret; 136 ssize_t ret;
137 137
138 if (ctx->error < 0) 138 if (ctx->error < 0)
139 return; 139 return;
140 140
141 ret = mipi_dsi_dcs_write(dsi, dsi->channel, data, len); 141 ret = mipi_dsi_dcs_write(dsi, dsi->channel, data, len);
142 if (ret < 0) { 142 if (ret < 0) {
143 dev_err(ctx->dev, "error %d writing dcs seq: %*ph\n", ret, len, 143 dev_err(ctx->dev, "error %zd writing dcs seq: %*ph\n", ret, len,
144 data); 144 data);
145 ctx->error = ret; 145 ctx->error = ret;
146 } 146 }
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index efa1b552adc5..4b0112781910 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -127,8 +127,8 @@ struct mipi_dsi_device {
127 127
128int mipi_dsi_attach(struct mipi_dsi_device *dsi); 128int mipi_dsi_attach(struct mipi_dsi_device *dsi);
129int mipi_dsi_detach(struct mipi_dsi_device *dsi); 129int mipi_dsi_detach(struct mipi_dsi_device *dsi);
130int mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, unsigned int channel, 130ssize_t mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, unsigned int channel,
131 const void *data, size_t len); 131 const void *data, size_t len);
132ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, unsigned int channel, 132ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, unsigned int channel,
133 u8 cmd, void *data, size_t len); 133 u8 cmd, void *data, size_t len);
134 134