lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20171212120232.GI16323@sirena.org.uk>
Date: Tue, 12 Dec 2017 12:02:32 +0000
From: Mark Brown <broonie@...nel.org>
To: "Andrew F. Davis" <afd@...com>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
alsa-devel@...a-project.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] ASoC: codecs: tas5720: add TAS5722 TDM slot width
setting support
On Mon, Dec 11, 2017 at 01:01:57PM -0600, Andrew F. Davis wrote:
> + /* Configure TDM slot width. This is only applicable to TAS5722. */
> + if (tas5720->devtype == TAS5722) {
> + ret = snd_soc_update_bits(codec, TAS5722_DIGITAL_CTRL2_REG,
> + TAS5722_TDM_SLOT_16B,
> + slot_width == 16 ?
> + TAS5722_TDM_SLOT_16B : 0);
> + if (ret < 0)
> + goto error_snd_soc_update_bits;
> + }
Use a switch statement, that way additional variants can be handled more
sensibly.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists