Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp508971pxj; Wed, 2 Jun 2021 04:57:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzOVCsd4enXPxV8qtaC6x9H9/yADkUiGBLQJLbJcaIfUH4wtVhXkCJFTPQIXy0mMzxeFJk X-Received: by 2002:a05:6638:32a8:: with SMTP id f40mr29752700jav.84.1622635061399; Wed, 02 Jun 2021 04:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622635061; cv=none; d=google.com; s=arc-20160816; b=Z9ZjMmgHoK5Ni42T0E5gE07m/XCelAxBZmm8jRllVuTLiRwMBXskJBMmSZdTBJfrH2 bW7B0FxF2iAGtBog2JHGGpEqJpjfU2M0q2hN/7UdXQfA3JVG5H6/f1eL++FFWvAqK2c9 AjrPC4+oebMWYXmUEgO8H1CV8WWMfKZUWTc3vzqKLqMQ2PWbZobKhb8pFIacSNtkKpYL UQ8uXgtGGnQGgIHV0y2xlpt0DeSxya1ATIZjSOB1boK1SemHCM/sqhrbnksos+kV348n 7eYR1RGh5SiqZa7W0ldAPIE/FVfLRr1S53Fqxe4GVgND4ifRhoRch5llirW2iWrHO9s+ ErBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=UhAY3/jy+E0oahICqWSZGdi6JFr6Ud4XU1NspelcHOM=; b=OagC/B5CAo7V+STR2ljzW83vuOThSIhTGoxZSEgDSbgHCI6v+6VOUcGOdH88Kt1nr5 vY+kJRnXWrEGjPssTvNsOIBjWdhgyLmMSmdZPrgKVRnKJ61KEpXtveqOgXYMSzjj1ekC Lig0TF4ics2PmzslBkOyOWfd9U3kcrlyf3OjiCg7mZcJYMZYrQL9wKEHKDie6NYbkIjs Id7cL8nga1+g0wX3xQmvK+ZtM9wzqR3/82mWh6srYLiZYmqdloOk8BEczFdlIppDBb7e n1M4Ftatw1IjunZdfVBKA9wvHz0LwSnWWldycrJ3AwFoRe6AzAGrhLRLO+9smP3Uqu2v gm2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u18si3235634iol.87.2021.06.02.04.57.28; Wed, 02 Jun 2021 04:57:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229800AbhFBLpp (ORCPT + 99 others); Wed, 2 Jun 2021 07:45:45 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:3394 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229665AbhFBLpk (ORCPT ); Wed, 2 Jun 2021 07:45:40 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Fw6XD0M7gz67cN; Wed, 2 Jun 2021 19:40:12 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 2 Jun 2021 19:43:56 +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; Wed, 2 Jun 2021 19:43:56 +0800 From: Zhen Lei To: Lee Jones , patches , linux-arm-kernel , linux-kernel CC: Zhen Lei Subject: [PATCH 3/9] mfd: timberdale: use DEVICE_ATTR_RO macro Date: Wed, 2 Jun 2021 19:43:33 +0800 Message-ID: <20210602114339.11223-4-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 In-Reply-To: <20210602114339.11223-1-thunder.leizhen@huawei.com> References: <20210602114339.11223-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei --- drivers/mfd/timberdale.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c index faecbca6dba3dc0..9393ee60a656cd4 100644 --- a/drivers/mfd/timberdale.c +++ b/drivers/mfd/timberdale.c @@ -623,8 +623,8 @@ static const struct mfd_cell timberdale_cells_bar2[] = { }, }; -static ssize_t show_fw_ver(struct device *dev, struct device_attribute *attr, - char *buf) +static ssize_t fw_ver_show(struct device *dev, + struct device_attribute *attr, char *buf) { struct timberdale_device *priv = dev_get_drvdata(dev); @@ -632,7 +632,7 @@ static ssize_t show_fw_ver(struct device *dev, struct device_attribute *attr, priv->fw.config); } -static DEVICE_ATTR(fw_ver, S_IRUGO, show_fw_ver, NULL); +static DEVICE_ATTR_RO(fw_ver); /*--------------------------------------------------------------------------*/ -- 2.26.0.106.g9fadedd