[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230531073751.48451-1-luhongfei@vivo.com>
Date: Wed, 31 May 2023 15:37:51 +0800
From: Lu Hongfei <luhongfei@...o.com>
To: Artur Weber <aweber.kernel@...il.com>,
Neil Armstrong <neil.armstrong@...aro.org>,
Sam Ravnborg <sam@...nborg.org>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel@...ts.freedesktop.org (open list:DRM PANEL DRIVERS),
linux-kernel@...r.kernel.org (open list)
Cc: opensource.kernel@...o.com, luhongfei@...o.com
Subject: [PATCH] gpu: drm/panel: Change the return value of s6d7aa0_lock to void
The return value of s6d7aa0_lock is meaningless,
it is better to modify it to void.
This patch fixes this issue and modifies the place
where s6d7aa0_lock is called.
Signed-off-by: Lu Hongfei <luhongfei@...o.com>
---
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 29 ++++---------------
1 file changed, 5 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
index 102e1fc7ee38..c5924e7b9e36
--- a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
@@ -63,10 +63,9 @@ static void s6d7aa0_reset(struct s6d7aa0 *ctx)
msleep(50);
}
-static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
+static void s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
{
struct mipi_dsi_device *dsi = ctx->dsi;
- int ret = 0;
if (lock) {
mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD1, 0xa5, 0xa5);
@@ -79,8 +78,6 @@ static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
if (ctx->desc->use_passwd3)
mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD3, 0xa5, 0xa5);
}
-
- return ret;
}
static int s6d7aa0_on(struct s6d7aa0 *ctx)
@@ -238,11 +235,7 @@ static int s6d7aa0_lsl080al02_init(struct s6d7aa0 *ctx)
usleep_range(20000, 25000);
- ret = s6d7aa0_lock(ctx, false);
- if (ret < 0) {
- dev_err(dev, "Failed to unlock registers: %d\n", ret);
- return ret;
- }
+ s6d7aa0_lock(ctx, false);
mipi_dsi_dcs_write_seq(dsi, MCS_OTP_RELOAD, 0x00, 0x10);
usleep_range(1000, 1500);
@@ -266,11 +259,7 @@ static int s6d7aa0_lsl080al02_init(struct s6d7aa0 *ctx)
msleep(120);
mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_ADDRESS_MODE, 0x00);
- ret = s6d7aa0_lock(ctx, true);
- if (ret < 0) {
- dev_err(dev, "Failed to lock registers: %d\n", ret);
- return ret;
- }
+ s6d7aa0_lock(ctx, true);
ret = mipi_dsi_dcs_set_display_on(dsi);
if (ret < 0) {
@@ -327,11 +316,7 @@ static int s6d7aa0_lsl080al03_init(struct s6d7aa0 *ctx)
usleep_range(20000, 25000);
- ret = s6d7aa0_lock(ctx, false);
- if (ret < 0) {
- dev_err(dev, "Failed to unlock registers: %d\n", ret);
- return ret;
- }
+ s6d7aa0_lock(ctx, false);
if (ctx->desc->panel_type == S6D7AA0_PANEL_LSL080AL03) {
mipi_dsi_dcs_write_seq(dsi, MCS_BL_CTL, 0xc7, 0x00, 0x29);
@@ -370,11 +355,7 @@ static int s6d7aa0_lsl080al03_init(struct s6d7aa0 *ctx)
return ret;
}
- ret = s6d7aa0_lock(ctx, true);
- if (ret < 0) {
- dev_err(dev, "Failed to lock registers: %d\n", ret);
- return ret;
- }
+ s6d7aa0_lock(ctx, true);
ret = mipi_dsi_dcs_set_display_on(dsi);
if (ret < 0) {
--
2.39.0
Powered by blists - more mailing lists