diff mbox series

[9/9] ASoC/fsl_spdif: Use put_unaligned_be24() instead of open-coding it

Message ID 20191028200700.213753-10-bvanassche@acm.org (mailing list archive)
State Not Applicable
Headers show
Series Consolidate {get,put}_unaligned_[bl]e24() definitions | expand

Commit Message

Bart Van Assche Oct. 28, 2019, 8:07 p.m. UTC
This patch makes the code easier to read.

Cc: Timur Tabi <timur@kernel.org>
Cc: Nicolin Chen <nicoleotsuka@gmail.com>
Cc: Xiubo Li <Xiubo.Lee@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 sound/soc/fsl/fsl_spdif.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Mark Brown Oct. 28, 2019, 8:24 p.m. UTC | #1
On Mon, Oct 28, 2019 at 01:07:00PM -0700, Bart Van Assche wrote:
> This patch makes the code easier to read.

I only have this patch from the series but no cover letter, what's the
story with dependencies?
Bart Van Assche Oct. 28, 2019, 8:49 p.m. UTC | #2
On 10/28/19 1:24 PM, Mark Brown wrote:
> On Mon, Oct 28, 2019 at 01:07:00PM -0700, Bart Van Assche wrote:
>> This patch makes the code easier to read.
> 
> I only have this patch from the series but no cover letter, what's the
> story with dependencies?

Hi Mark,

The entire patch series including the cover letter is available on e.g. 
the Lore linux-kernel archive: 
https://lore.kernel.org/lkml/20191028200700.213753-1-bvanassche@acm.org/T/#t

Thanks,

Bart.
diff mbox series

Patch

diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index 7858a5499ac5..8e80ae16f566 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -16,6 +16,7 @@ 
 #include <linux/of_device.h>
 #include <linux/of_irq.h>
 #include <linux/regmap.h>
+#include <asm/unaligned.h>
 
 #include <sound/asoundef.h>
 #include <sound/dmaengine_pcm.h>
@@ -173,9 +174,7 @@  static void spdif_irq_uqrx_full(struct fsl_spdif_priv *spdif_priv, char name)
 	}
 
 	regmap_read(regmap, reg, &val);
-	ctrl->subcode[*pos++] = val >> 16;
-	ctrl->subcode[*pos++] = val >> 8;
-	ctrl->subcode[*pos++] = val;
+	put_unaligned_be24(val, &ctrl->subcode[*pos]);
 }
 
 /* U/Q Channel sync found */