* [PATCH -next] ALSA: core: timer: Use NSEC_PER_SEC macro
@ 2024-09-02 7:16 Jinjie Ruan
2024-09-02 8:18 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Jinjie Ruan @ 2024-09-02 7:16 UTC (permalink / raw)
To: perex, tiwai, ivan.orlov0322, linux-sound; +Cc: ruanjinjie
1000000000L is number of ns per second, use NSEC_PER_SEC macro to replace
it to make it more readable
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
sound/core/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 7610f102360d..4315d1e98ebf 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1174,7 +1174,7 @@ static int snd_timer_s_close(struct snd_timer *timer)
static const struct snd_timer_hardware snd_timer_system =
{
.flags = SNDRV_TIMER_HW_FIRST | SNDRV_TIMER_HW_WORK,
- .resolution = 1000000000L / HZ,
+ .resolution = NSEC_PER_SEC / HZ,
.ticks = 10000000L,
.close = snd_timer_s_close,
.start = snd_timer_s_start,
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] ALSA: core: timer: Use NSEC_PER_SEC macro
2024-09-02 7:16 [PATCH -next] ALSA: core: timer: Use NSEC_PER_SEC macro Jinjie Ruan
@ 2024-09-02 8:18 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2024-09-02 8:18 UTC (permalink / raw)
To: Jinjie Ruan; +Cc: perex, tiwai, ivan.orlov0322, linux-sound
On Mon, 02 Sep 2024 09:16:22 +0200,
Jinjie Ruan wrote:
>
> 1000000000L is number of ns per second, use NSEC_PER_SEC macro to replace
> it to make it more readable
>
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-02 8:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-02 7:16 [PATCH -next] ALSA: core: timer: Use NSEC_PER_SEC macro Jinjie Ruan
2024-09-02 8:18 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox