Commit 371c359f authored by Thierry Reding's avatar Thierry Reding

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: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 102932b0
...@@ -205,8 +205,8 @@ EXPORT_SYMBOL(mipi_dsi_detach); ...@@ -205,8 +205,8 @@ EXPORT_SYMBOL(mipi_dsi_detach);
* @data: pointer to the command followed by parameters * @data: pointer to the command followed by parameters
* @len: length of @data * @len: length of @data
*/ */
int mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, unsigned int channel, ssize_t mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, unsigned int channel,
const void *data, size_t len) const void *data, size_t len)
{ {
const struct mipi_dsi_host_ops *ops = dsi->host->ops; const struct mipi_dsi_host_ops *ops = dsi->host->ops;
struct mipi_dsi_msg msg = { struct mipi_dsi_msg msg = {
......
...@@ -133,14 +133,14 @@ static int s6e8aa0_clear_error(struct s6e8aa0 *ctx) ...@@ -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) 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); struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
int ret; ssize_t ret;
if (ctx->error < 0) if (ctx->error < 0)
return; return;
ret = mipi_dsi_dcs_write(dsi, dsi->channel, data, len); ret = mipi_dsi_dcs_write(dsi, dsi->channel, data, len);
if (ret < 0) { 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); data);
ctx->error = ret; ctx->error = ret;
} }
......
...@@ -127,8 +127,8 @@ struct mipi_dsi_device { ...@@ -127,8 +127,8 @@ struct mipi_dsi_device {
int mipi_dsi_attach(struct mipi_dsi_device *dsi); int mipi_dsi_attach(struct mipi_dsi_device *dsi);
int mipi_dsi_detach(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, ssize_t mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, unsigned int channel,
const void *data, size_t len); const void *data, size_t len);
ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, unsigned int channel, ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, unsigned int channel,
u8 cmd, void *data, size_t len); u8 cmd, void *data, size_t len);
......
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