Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3348345pxj; Mon, 24 May 2021 04:49:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBA5DPMXZ2RuPZ+qF2SrlfZ0DAm3l99orDwo6aAvZ1WMF8JPSPgGcrGst8BrniTCei9Kms X-Received: by 2002:aa7:c805:: with SMTP id a5mr7808714edt.128.1621856963031; Mon, 24 May 2021 04:49:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621856963; cv=none; d=google.com; s=arc-20160816; b=Rw3zhVfiQESp2G+XW6p9fgLhVskJIV1t4sluV2sTExN+VIOdSerVdqTNpc7rY4DNJC aS8zG+OafefY8z+HA6MPcvYDQbqrBYoNUgWz/TbJsZKzZ4qL9yCnx1dn0uv0rN1ULkjp uBDA1xmj+xVWycjTSpjsH/ctv23iiupIzCfR2m94uyfu80dyCeVLTQ4yvaJN929JwBGc mJAE4PZ3pItx9J3KPqzToPffjEWfaxMdjvmDlVuv9bfDdDL9XPjCRX8+jwI7Aw8RTaKW 1xVlk02UAnOZVprjFancFGFKzEMVSjp3Zb41HzL0fKUNdLschm3sDPL6f/tsYMsaLw3Q cT6g== 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=cW/LYy5EdNy+f25OK8hJ2BmRZ7Z113RPzOYBudzOMq4=; b=J+l0icPnRgR822qdsZrhbLeNPRzEwG6MpoYV2+cjTpTqhK73QCnSxz8/BqZ0KLXp54 MdABd/aFG0TSV6wbX17eHI3ou7N1ZFHOO8T0ktJm1k46G0QFGbHl10xa6vmiOO7VIhqL PvOy96MdTO56ik58g9uL2RKMQHIF5T5d0Rg14HW8YewKpwSiR+VGADcgnkrTh/9x4eTd SE5Mo+ocQ+S0Nc6kXFxorp7I8jukX4csuCzn44gG2IMly98klMkMbx/2NvrO7A9sdcd8 xrzB+IHAIjKpF1Z8e62Wn+uDu/T4Gq2ycbYIjIUm+rqesYTf6JfEiGRFbk4WXWhb6y1n YgHA== 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 rl18si12084414ejb.412.2021.05.24.04.49.00; Mon, 24 May 2021 04:49:23 -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 S232563AbhEXLtd (ORCPT + 99 others); Mon, 24 May 2021 07:49:33 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:3927 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232476AbhEXLtc (ORCPT ); Mon, 24 May 2021 07:49:32 -0400 Received: from dggems706-chm.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4Fpb4573dczBvm6; Mon, 24 May 2021 19:45:09 +0800 (CST) Received: from dggema769-chm.china.huawei.com (10.1.198.211) by dggems706-chm.china.huawei.com (10.3.19.183) 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:48:00 +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:48:00 +0800 From: YueHaibing To: , , , CC: , , , YueHaibing Subject: [PATCH -next] ASoC: wm8962: Use DEVICE_ATTR_WO macro Date: Mon, 24 May 2021 19:47:53 +0800 Message-ID: <20210524114753.39544-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/wm8962.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 34080f497584..ba16bdf9e478 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -3219,9 +3219,8 @@ static int wm8962_beep_event(struct input_dev *dev, unsigned int type, return 0; } -static ssize_t wm8962_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 wm8962_priv *wm8962 = dev_get_drvdata(dev); long int time; @@ -3236,7 +3235,7 @@ static ssize_t wm8962_beep_set(struct device *dev, return count; } -static DEVICE_ATTR(beep, 0200, NULL, wm8962_beep_set); +static DEVICE_ATTR_WO(beep); static void wm8962_init_beep(struct snd_soc_component *component) { -- 2.17.1