linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>,
	"Signed-off-by : Wolfram Sang" <wsa@the-dreams.de>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	linux-fbdev <linux-fbdev@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] video: fbdev: mb862xx: use DEVICE_ATTR_RO macro
Date: Tue, 1 Jun 2021 18:12:29 +0200	[thread overview]
Message-ID: <YLZcbZVXnYBQM3n+@phenom.ffwll.local> (raw)
In-Reply-To: <20210601090852.10531-1-thunder.leizhen@huawei.com>

On Tue, Jun 01, 2021 at 05:08:52PM +0800, Zhen Lei wrote:
> 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>

Applied to drm-misc-next, thanks.
-Daniel

> ---
>  drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c b/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
> index 52755b591c1489f..63721337a37787b 100644
> --- a/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
> +++ b/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
> @@ -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;
> @@ -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)
>  {
> -- 
> 2.26.0.106.g9fadedd
> 
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

      reply	other threads:[~2021-06-01 16:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01  9:08 [PATCH 1/1] video: fbdev: mb862xx: use DEVICE_ATTR_RO macro Zhen Lei
2021-06-01 16:12 ` Daniel Vetter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YLZcbZVXnYBQM3n+@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=b.zolnierkie@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thunder.leizhen@huawei.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).