diff mbox series

[-next] drm/exynos-vidi: use DEVICE_ATTR_RW macro

Message ID 20210528072120.21332-1-yuehaibing@huawei.com (mailing list archive)
State Not Applicable
Headers show
Series [-next] drm/exynos-vidi: use DEVICE_ATTR_RW macro | expand

Commit Message

Yue Haibing May 28, 2021, 7:21 a.m. UTC
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 mbox series

Patch

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,