Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3346385pxj; Mon, 24 May 2021 04:46:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa6cyrVfRPV5Sv1wUVB+gqxGa50ALAQRck+MK2c2q8jm9hWSPoyDM0B2xxPL5hZMlFyJBX X-Received: by 2002:a92:c7a1:: with SMTP id f1mr15625804ilk.85.1621856797567; Mon, 24 May 2021 04:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621856797; cv=none; d=google.com; s=arc-20160816; b=TjEvhyqvKj0W9jkQvY/93FIKVBMPz8PXJ0UJTi0dOtZV4LrlRceyoz7IxFcN39LrFu kEVIhMfxSkp7UIwbhmTaj2QqzSOLRrsQLzNML2ls7ExS1ZQrWV47cZ7w19Y99HvDsAeg 5ggg6VACaF/AMQi6Iul/KJ3ZgtCeyvmWVjo5Rr+fM/p4dxaTlviurZLVCNvQFW1ggBaZ FKZQa69YEjSf0SdjhAa0DqAb6rfjECSAXEOrJoeIhnA9YJe+JfUANoehwRCB8vblekdk ggFO3z8/DrGeK4jF4Ldjva2+fTXPLjjsltNvxl1jXQ1c/z3pTTXn8NCW5snRQRWNE77A 2s2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=DtB630u31zRBFaHKkmZ62+DeDPx2ybCNModxvMIuYIg=; b=nW1ic/PHP2L6L3SsvMAVPsmtqIDhSBynwTu11vMQBaOyfHDlQSi1jZsGhOMpvmvQqB hRUTPwZyFovtd26c9tWe1847mnk1VfLMN/ygWkzS/v9oLxO8tQ3z4MQ269uEpRn/vxpP Dla/IHVpO5qtY1mJaxYP3XqAVv6i9HZCO3B33nVNpUSeFHTV8wFCNNNS1fETLQNmciLr wyOkwS8md7tooTuEejhFuFoAcn3nLsoDyL48iZ2iL1dqNyfvOt1uuPZHCc3fnhTvEko/ GLaqBlfFESkIYN0z1pEkKPOTTcVmLFvbSrcxdj705BLszulJebwtF4GQLF/nrCeaRTEl Kwxg== 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 h6si12436757jaj.29.2021.05.24.04.46.24; Mon, 24 May 2021 04:46:37 -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 S232753AbhEXLqw (ORCPT + 99 others); Mon, 24 May 2021 07:46:52 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5679 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232110AbhEXLqt (ORCPT ); Mon, 24 May 2021 07:46:49 -0400 Received: from dggems705-chm.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Fpb122v74z1BR46; Mon, 24 May 2021 19:42:30 +0800 (CST) Received: from dggema769-chm.china.huawei.com (10.1.198.211) by dggems705-chm.china.huawei.com (10.3.19.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Mon, 24 May 2021 19:45:20 +0800 Received: from localhost (10.174.179.215) by dggema769-chm.china.huawei.com (10.1.198.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Mon, 24 May 2021 19:45:20 +0800 From: YueHaibing To: , , , , , CC: , , , YueHaibing Subject: [PATCH -next] ASoC: cs42l56: use DEVICE_ATTR_WO macro Date: Mon, 24 May 2021 19:45:03 +0800 Message-ID: <20210524114503.26460-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.179.215] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggema769-chm.china.huawei.com (10.1.198.211) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use DEVICE_ATTR_WO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing --- sound/soc/codecs/cs42l56.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c index 7cdffdf6b8cf..3cf8a0b4478c 100644 --- a/sound/soc/codecs/cs42l56.c +++ b/sound/soc/codecs/cs42l56.c @@ -1021,9 +1021,8 @@ static int cs42l56_beep_event(struct input_dev *dev, unsigned int type, return 0; } -static ssize_t cs42l56_beep_set(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) +static ssize_t beep_store(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) { struct cs42l56_private *cs42l56 = dev_get_drvdata(dev); long int time; @@ -1038,7 +1037,7 @@ static ssize_t cs42l56_beep_set(struct device *dev, return count; } -static DEVICE_ATTR(beep, 0200, NULL, cs42l56_beep_set); +static DEVICE_ATTR_WO(beep); static void cs42l56_init_beep(struct snd_soc_component *component) { -- 2.17.1