2021-05-28 06:40:25

by Yue Haibing

[permalink] [raw]
Subject: [PATCH -next] ASoC: ti: omap-mcbsp: use DEVICE_ATTR_RW macro

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 <[email protected]>
---
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


2021-05-28 15:12:19

by Jarkko Nikula

[permalink] [raw]
Subject: Re: [PATCH -next] ASoC: ti: omap-mcbsp: use DEVICE_ATTR_RW macro

On 5/28/21 9:30 AM, YueHaibing wrote:
> 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 <[email protected]>
> ---
> sound/soc/ti/omap-mcbsp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Acked-by: Jarkko Nikula <[email protected]>

2021-05-31 07:45:00

by Péter Ujfalusi

[permalink] [raw]
Subject: Re: [PATCH -next] ASoC: ti: omap-mcbsp: use DEVICE_ATTR_RW macro



On 28/05/2021 09:30, YueHaibing wrote:
> Use DEVICE_ATTR_RW() helper instead of plain DEVICE_ATTR(),
> which makes the code a bit shorter and easier to read.

Acked-by: Peter Ujfalusi <[email protected]>

> Signed-off-by: YueHaibing <[email protected]>
> ---
> 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);
>

--
Péter

2021-06-01 17:44:03

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH -next] ASoC: ti: omap-mcbsp: use DEVICE_ATTR_RW macro

On Fri, 28 May 2021 14:30:33 +0800, YueHaibing wrote:
> Use DEVICE_ATTR_RW() helper instead of plain DEVICE_ATTR(),
> which makes the code a bit shorter and easier to read.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: ti: omap-mcbsp: use DEVICE_ATTR_RW macro
commit: b1b384de0a9be2d2913c8a308f381da0b9184e91

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark