Commit ff323d6d authored by Zhen Lei's avatar Zhen Lei Committed by Daniel Vetter

video: fbdev: mb862xx: use DEVICE_ATTR_RO macro

Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR, which makes the
code a bit shorter and easier to read.
Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210601090852.10531-1-thunder.leizhen@huawei.com
parent c5ef15ae
...@@ -542,8 +542,8 @@ static int mb862xxfb_init_fbinfo(struct fb_info *fbi) ...@@ -542,8 +542,8 @@ static int mb862xxfb_init_fbinfo(struct fb_info *fbi)
/* /*
* show some display controller and cursor registers * show some display controller and cursor registers
*/ */
static ssize_t mb862xxfb_show_dispregs(struct device *dev, static ssize_t dispregs_show(struct device *dev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
struct fb_info *fbi = dev_get_drvdata(dev); struct fb_info *fbi = dev_get_drvdata(dev);
struct mb862xxfb_par *par = fbi->par; struct mb862xxfb_par *par = fbi->par;
...@@ -577,7 +577,7 @@ static ssize_t mb862xxfb_show_dispregs(struct device *dev, ...@@ -577,7 +577,7 @@ static ssize_t mb862xxfb_show_dispregs(struct device *dev,
return ptr - buf; return ptr - buf;
} }
static DEVICE_ATTR(dispregs, 0444, mb862xxfb_show_dispregs, NULL); static DEVICE_ATTR_RO(dispregs);
static irqreturn_t mb862xx_intr(int irq, void *dev_id) static irqreturn_t mb862xx_intr(int irq, void *dev_id)
{ {
......
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