lkml.org 
[lkml]   [2021]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -next] ASoC: ti: omap-mcbsp: use DEVICE_ATTR_RW macro
From
Date


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 <peter.ujfalusi@gmail.com>

> 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);
>

--
Péter

\
 
 \ /
  Last update: 2021-05-31 09:43    [W:0.065 / U:2.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site