Skip to content

Commit

Permalink
video: fbdev: mb862xx: use DEVICE_ATTR_RO macro
Browse files Browse the repository at this point in the history
Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR, which makes the
code a bit shorter and easier to read.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210601090852.10531-1-thunder.leizhen@huawei.com
  • Loading branch information
Zhen Lei authored and Daniel Vetter committed Jun 3, 2021
1 parent c5ef15a commit ff323d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,8 @@ static int mb862xxfb_init_fbinfo(struct fb_info *fbi)
/*
* show some display controller and cursor registers
*/
static ssize_t mb862xxfb_show_dispregs(struct device *dev,
struct device_attribute *attr, char *buf)
static ssize_t dispregs_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct fb_info *fbi = dev_get_drvdata(dev);
struct mb862xxfb_par *par = fbi->par;
Expand Down Expand Up @@ -577,7 +577,7 @@ static ssize_t mb862xxfb_show_dispregs(struct device *dev,
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)
{
Expand Down

0 comments on commit ff323d6

Please sign in to comment.