linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/exynos-vidi: use DEVICE_ATTR_RW macro
@ 2021-05-28  7:21 YueHaibing
  0 siblings, 0 replies; only message in thread
From: YueHaibing @ 2021-05-28  7:21 UTC (permalink / raw)
  To: inki.dae, jy0922.shim, sw0312.kim, kyungmin.park, airlied,
	daniel, krzysztof.kozlowski, yuehaibing
  Cc: dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel

Use DEVICE_ATTR_RW() helper instead of plain DEVICE_ATTR(),
which makes the code a bit shorter and easier to read.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/exynos/exynos_drm_vidi.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
index e5662bdcbbde..a3a95a2c0bae 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
@@ -165,8 +165,8 @@ static void vidi_fake_vblank_timer(struct timer_list *t)
 			jiffies + msecs_to_jiffies(VIDI_REFRESH_TIME) - 1);
 }
 
-static ssize_t vidi_show_connection(struct device *dev,
-				struct device_attribute *attr, char *buf)
+static ssize_t connection_show(struct device *dev,
+			       struct device_attribute *attr, char *buf)
 {
 	struct vidi_context *ctx = dev_get_drvdata(dev);
 	int rc;
@@ -180,7 +180,7 @@ static ssize_t vidi_show_connection(struct device *dev,
 	return rc;
 }
 
-static ssize_t vidi_store_connection(struct device *dev,
+static ssize_t connection_store(struct device *dev,
 				struct device_attribute *attr,
 				const char *buf, size_t len)
 {
@@ -211,8 +211,7 @@ static ssize_t vidi_store_connection(struct device *dev,
 	return len;
 }
 
-static DEVICE_ATTR(connection, 0644, vidi_show_connection,
-			vidi_store_connection);
+static DEVICE_ATTR_RW(connection);
 
 static struct attribute *vidi_attrs[] = {
 	&dev_attr_connection.attr,
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-28  7:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28  7:21 [PATCH -next] drm/exynos-vidi: use DEVICE_ATTR_RW macro YueHaibing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).