drm/dsi: Make mipi_dsi_dcs_write() return ssize_t
authorThierry Reding <treding@nvidia.com>
Mon, 21 Jul 2014 10:22:26 +0000 (12:22 +0200)
committerThierry Reding <treding@nvidia.com>
Tue, 22 Jul 2014 07:06:16 +0000 (09:06 +0200)
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>
drivers/gpu/drm/drm_mipi_dsi.c
drivers/gpu/drm/panel/panel-s6e8aa0.c
include/drm/drm_mipi_dsi.h

index e633df2f68d896622b56a946dd0b649826cf05bc..6d2fd2077daef0f9a83b73a7aa75d29a500a1721 100644 (file)
@@ -205,8 +205,8 @@ EXPORT_SYMBOL(mipi_dsi_detach);
  * @data: pointer to the command followed by parameters
  * @len: length of @data
  */
-int mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, unsigned int channel,
-                      const void *data, size_t len)
+ssize_t mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, unsigned int channel,
+                          const void *data, size_t len)
 {
        const struct mipi_dsi_host_ops *ops = dsi->host->ops;
        struct mipi_dsi_msg msg = {
index 06e57a26db7a5ed09561442aab1dfe840d770775..beb43492b6492c41735955617d7f21d087bd2fdd 100644 (file)
@@ -133,14 +133,14 @@ static int s6e8aa0_clear_error(struct s6e8aa0 *ctx)
 static void s6e8aa0_dcs_write(struct s6e8aa0 *ctx, const void *data, size_t len)
 {
        struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
-       int ret;
+       ssize_t ret;
 
        if (ctx->error < 0)
                return;
 
        ret = mipi_dsi_dcs_write(dsi, dsi->channel, data, len);
        if (ret < 0) {
-               dev_err(ctx->dev, "error %d writing dcs seq: %*ph\n", ret, len,
+               dev_err(ctx->dev, "error %zd writing dcs seq: %*ph\n", ret, len,
                        data);
                ctx->error = ret;
        }
index efa1b552adc5c2ac6612fbc41dd8dc307486973c..4b01127819106d95725bad479702ea84a1b34be2 100644 (file)
@@ -127,8 +127,8 @@ struct mipi_dsi_device {
 
 int mipi_dsi_attach(struct mipi_dsi_device *dsi);
 int mipi_dsi_detach(struct mipi_dsi_device *dsi);
-int mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, unsigned int channel,
-                      const void *data, size_t len);
+ssize_t mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, unsigned int channel,
+                          const void *data, size_t len);
 ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, unsigned int channel,
                          u8 cmd, void *data, size_t len);