[PATCH v2 05/12] drm: panel: replace dev_* with DRM_DEV_* equivalent in panel-lg-lg4573
Aastha Gupta
aastha.gupta4104 at gmail.com
Tue Oct 24 14:10:56 UTC 2017
For drivers which could have multiple instances, it is necessary to
differentiate between which is which in the logs. Since
DRM_INFO/WARN/ERROR don’t do this, drivers used dev_info/warn/err to
make this differentiation. We now have DRM_DEV_* variants of the drm
print macros, so we can start to convert those drivers back to using
drm-formatted specific log messages.
This patch is using following Coccinelle script:
@@
@@
(
- dev_info
+ DRM_DEV_INFO
|
- dev_err
+ DRM_DEV_ERROR
|
- dev_dbg
+ DRM_DEV_DEBUG
)
Signed-off-by: Aastha Gupta <aastha.gupta4104 at gmail.com>
---
drivers/gpu/drm/panel/panel-lg-lg4573.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-lg-lg4573.c b/drivers/gpu/drm/panel/panel-lg-lg4573.c
index 6989238..77c1c87 100644
--- a/drivers/gpu/drm/panel/panel-lg-lg4573.c
+++ b/drivers/gpu/drm/panel/panel-lg-lg4573.c
@@ -45,7 +45,7 @@ static int lg4573_spi_write_u16(struct lg4573 *ctx, u16 data)
u16 temp = cpu_to_be16(data);
struct spi_message msg;
- dev_dbg(ctx->panel.dev, "writing data: %x\n", data);
+ DRM_DEV_DEBUG(ctx->panel.dev, "writing data: %x\n", data);
xfer.tx_buf = &temp;
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -112,7 +112,7 @@ static int lg4573_display_mode_settings(struct lg4573 *ctx)
0x7206, 0x720C, 0x7200, 0x7200,
};
- dev_dbg(ctx->panel.dev, "transfer display mode settings\n");
+ DRM_DEV_DEBUG(ctx->panel.dev, "transfer display mode settings\n");
return lg4573_spi_write_u16_array(ctx, display_mode_settings,
ARRAY_SIZE(display_mode_settings));
}
@@ -128,7 +128,7 @@ static int lg4573_power_settings(struct lg4573 *ctx)
0x7263,
};
- dev_dbg(ctx->panel.dev, "transfer power settings\n");
+ DRM_DEV_DEBUG(ctx->panel.dev, "transfer power settings\n");
return lg4573_spi_write_u16_array(ctx, power_settings,
ARRAY_SIZE(power_settings));
}
@@ -153,7 +153,7 @@ static int lg4573_gamma_settings(struct lg4573 *ctx)
0x7201, 0x7220, 0x7200, 0x7203,
};
- dev_dbg(ctx->panel.dev, "transfer gamma settings\n");
+ DRM_DEV_DEBUG(ctx->panel.dev, "transfer gamma settings\n");
return lg4573_spi_write_u16_array(ctx, gamma_settings,
ARRAY_SIZE(gamma_settings));
}
@@ -162,7 +162,7 @@ static int lg4573_init(struct lg4573 *ctx)
{
int ret;
- dev_dbg(ctx->panel.dev, "initializing LCD\n");
+ DRM_DEV_DEBUG(ctx->panel.dev, "initializing LCD\n");
ret = lg4573_display_mode_settings(ctx);
if (ret)
@@ -216,9 +216,9 @@ static int lg4573_get_modes(struct drm_panel *panel)
mode = drm_mode_duplicate(panel->drm, &default_mode);
if (!mode) {
- dev_err(panel->drm->dev, "failed to add mode %ux%ux@%u\n",
- default_mode.hdisplay, default_mode.vdisplay,
- default_mode.vrefresh);
+ DRM_DEV_ERROR(panel->drm->dev, "failed to add mode %ux%ux@%u\n",
+ default_mode.hdisplay, default_mode.vdisplay,
+ default_mode.vrefresh);
return -ENOMEM;
}
@@ -255,7 +255,7 @@ static int lg4573_probe(struct spi_device *spi)
ret = spi_setup(spi);
if (ret < 0) {
- dev_err(&spi->dev, "SPI setup failed: %d\n", ret);
+ DRM_DEV_ERROR(&spi->dev, "SPI setup failed: %d\n", ret);
return ret;
}
--
2.7.4
More information about the dri-devel
mailing list