From: YueHaibing <yuehaibing@huawei.com> To: <peter.ujfalusi@gmail.com>, <jarkko.nikula@bitmer.com>, <lgirdwood@gmail.com>, <broonie@kernel.org>, <perex@perex.cz>, <tiwai@suse.com> Cc: <alsa-devel@alsa-project.org>, <linux-omap@vger.kernel.org>, <linux-kernel@vger.kernel.org>, YueHaibing <yuehaibing@huawei.com> Subject: [PATCH -next] ASoC: ti: omap-mcbsp: use DEVICE_ATTR_RW macro Date: Fri, 28 May 2021 14:30:33 +0800 [thread overview] Message-ID: <20210528063033.19904-1-yuehaibing@huawei.com> (raw) Use DEVICE_ATTR_RW() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- sound/soc/ti/omap-mcbsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c index db47981768c5..4479d74f0a45 100644 --- a/sound/soc/ti/omap-mcbsp.c +++ b/sound/soc/ti/omap-mcbsp.c @@ -539,7 +539,7 @@ static ssize_t prop##_store(struct device *dev, \ return size; \ } \ \ -static DEVICE_ATTR(prop, 0644, prop##_show, prop##_store) +static DEVICE_ATTR_RW(prop) THRESHOLD_PROP_BUILDER(max_tx_thres); THRESHOLD_PROP_BUILDER(max_rx_thres); -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: YueHaibing <yuehaibing@huawei.com> To: <peter.ujfalusi@gmail.com>, <jarkko.nikula@bitmer.com>, <lgirdwood@gmail.com>, <broonie@kernel.org>, <perex@perex.cz>, <tiwai@suse.com> Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, YueHaibing <yuehaibing@huawei.com>, linux-kernel@vger.kernel.org Subject: [PATCH -next] ASoC: ti: omap-mcbsp: use DEVICE_ATTR_RW macro Date: Fri, 28 May 2021 14:30:33 +0800 [thread overview] Message-ID: <20210528063033.19904-1-yuehaibing@huawei.com> (raw) Use DEVICE_ATTR_RW() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- sound/soc/ti/omap-mcbsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c index db47981768c5..4479d74f0a45 100644 --- a/sound/soc/ti/omap-mcbsp.c +++ b/sound/soc/ti/omap-mcbsp.c @@ -539,7 +539,7 @@ static ssize_t prop##_store(struct device *dev, \ return size; \ } \ \ -static DEVICE_ATTR(prop, 0644, prop##_show, prop##_store) +static DEVICE_ATTR_RW(prop) THRESHOLD_PROP_BUILDER(max_tx_thres); THRESHOLD_PROP_BUILDER(max_rx_thres); -- 2.17.1
next reply other threads:[~2021-05-28 6:31 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-28 6:30 YueHaibing [this message] 2021-05-28 6:30 ` [PATCH -next] ASoC: ti: omap-mcbsp: use DEVICE_ATTR_RW macro YueHaibing 2021-05-28 12:55 ` Jarkko Nikula 2021-05-31 7:41 ` Péter Ujfalusi 2021-06-01 17:38 ` Mark Brown 2021-06-01 17:38 ` Mark Brown
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=20210528063033.19904-1-yuehaibing@huawei.com \ --to=yuehaibing@huawei.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=jarkko.nikula@bitmer.com \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ --cc=perex@perex.cz \ --cc=peter.ujfalusi@gmail.com \ --cc=tiwai@suse.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.