lkml.org 
[lkml]   [2023]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mfd: cs42l43: Correct SoundWire port list
On Thu, 23 Nov 2023, Charles Keepax wrote:

> On Thu, Nov 23, 2023 at 11:30:55AM +0000, Lee Jones wrote:
> > On Mon, 13 Nov 2023, Charles Keepax wrote:
> > > enum cs42l43_sdw_ports {
> > > - CS42L43_DMIC_DEC_ASP_PORT = 1,
> > > - CS42L43_SPK_TX_PORT,
> > > - CS42L43_SPDIF_HP_PORT,
> > > - CS42L43_SPK_RX_PORT,
> > > - CS42L43_ASP_PORT,
> > > + CS42L43_DP1 = 1,
> > > + CS42L43_DP2,
> > > + CS42L43_DP3,
> > > + CS42L43_DP4,
> > > + CS42L43_DP5,
> > > + CS42L43_DP6,
> > > + CS42L43_DP7,
> > > };
> >
> > This is starting to look a little redundant now.
> >
> > I'm not sure if this is better, but it sure takes up less room:
> >
> > #define CS42L43_SDW_PORT(port) port
> >
>
> Sure, I think that is better. Will respin the patch. I mean I
> guess I could also just drop the enum/define entirely and just
> use the port numbers. But will assume you prefer the define
> unless I hear otherwise.

Yes, I like magic numbers even less. Thanks.

--
Lee Jones [李琼斯]

\
 
 \ /
  Last update: 2023-11-23 15:19    [W:0.046 / U:3.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site