From patchwork Tue Jun 1 09:08:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 451358 Delivered-To: patch@linaro.org Received: by 2002:a02:c735:0:0:0:0:0 with SMTP id h21csp1587381jao; Tue, 1 Jun 2021 02:09:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyE0JFkZjRZQWi7i0duvQUCp4trYQWQTKJnaoPdOVbkJRtOw/1uX0HNE7CNejeevRbotX/T X-Received: by 2002:a17:90a:668d:: with SMTP id m13mr19571904pjj.144.1622538548734; Tue, 01 Jun 2021 02:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622538548; cv=none; d=google.com; s=arc-20160816; b=b5O8jtfOENOxWorj5Om5jtWD5JCiIraW62099+LxpFBgewOpiy13J0g/Xu9WG7YDR5 x0rp4IkbN32T29yRRezkRTdvpYOUDsy1BRPaorBGLceCunDx1SKv57shrbl0Rz7Z2opQ /7flmoTGWWo9ZLR3CyXJSQH5Fduw54+xyR8uyy1DJaJCHiPQVgTH4MfaJUIYxphppSmq W7TLPReLxpV42NGfbQfwu1ovFK1mmjQz915TnDLIJFIqxmQ0fmGbWjm0vkoVGgTNp2fi 8B+EwGsgglnHfkK16kB4bNsA42Pm1Upoj3aZ781Qj9BxAxzshWNKKM++xb+qZ290PNLp FR2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:delivered-to; bh=EDmwQvJ7aHClTBTsBi3l0t/T/8YzX8nf/gvqC3fzi2w=; b=XH0EIrkVb2W8JMQA3NwJnjFG6ISGGSqD/hNLzJZY535B9u5y8NIweQyVLsUVB1Fmw3 vTk8O5FQHFKP3teZQyeSE/vXAZA5eovbkc3tMpGW3N5Pc2IFoKuYGKoSwuLmmXydr/mR hItiy159CpxNwYsUjHOFdg0ZoK37hk2K3LuLplsn3aalGIz/ZK+iLNcRAOdAvA/k1zCi c/QFahnz1TKCQIJ0lLII8SdsXXFrlh9veWrkBB9WEsj3Ahw8osiZZ3A/B1Oqwbf9pjc0 77hjWTPoBXfgAUPdszVvIHHClJQ21sXDxsBpKcPsc1XKAKH6f0p7JWozhR2ipjnc1o6N FrMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id b5si19223076pgt.321.2021.06.01.02.09.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jun 2021 02:09:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F05A6E02D; Tue, 1 Jun 2021 09:09:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by gabe.freedesktop.org (Postfix) with ESMTPS id D00616E02D for ; Tue, 1 Jun 2021 09:09:04 +0000 (UTC) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4FvR954gkWzYnSM; Tue, 1 Jun 2021 17:06:17 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 1 Jun 2021 17:09:01 +0800 Received: from thunder-town.china.huawei.com (10.174.177.72) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 1 Jun 2021 17:09:00 +0800 From: Zhen Lei To: Tomi Valkeinen , "Signed-off-by : Wolfram Sang" , Bartlomiej Zolnierkiewicz , dri-devel , linux-fbdev , linux-kernel Subject: [PATCH 1/1] video: fbdev: mb862xx: use DEVICE_ATTR_RO macro Date: Tue, 1 Jun 2021 17:08:52 +0800 Message-ID: <20210601090852.10531-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhen Lei Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.26.0.106.g9fadedd 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) {