Message ID | 1496885261-10771-3-git-send-email-harshapriya.n@intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 9a90c972b6e5814a5f928f8d5a3d145fa50988b0 |
Headers | show |
On Wed, Jun 07, 2017 at 06:27:40PM -0700, Harsha Priya wrote: > C99 style struct initialization helps in readability as well as > initialization of variables not specified as NULL. This patch > changes the struct data defintions in skl.c that were not in c99 style. here as well :( > --- > sound/soc/intel/skylake/skl.c | 23 +++++++++++++++++++---- > 1 file changed, 19 insertions(+), 4 deletions(-) > > diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c > index 4ebae85..6a79fc7 100644 > --- a/sound/soc/intel/skylake/skl.c > +++ b/sound/soc/intel/skylake/skl.c > @@ -876,10 +876,25 @@ static void skl_remove(struct pci_dev *pci) > dev_set_drvdata(&pci->dev, NULL); > } > > -static struct sst_codecs skl_codecs = { 1, {"NAU88L25"} }; > -static struct sst_codecs kbl_codecs = { 1, {"NAU88L25"} }; > -static struct sst_codecs bxt_codecs = { 1, {"MX98357A"} }; > -static struct sst_codecs kbl_poppy_codecs = { 1, {"10EC5663"} }; > +static struct sst_codecs skl_codecs = { > + .num_codecs = 1, > + .codecs = {"NAU88L25"} > +}; > + > +static struct sst_codecs kbl_codecs = { > + .num_codecs = 1, > + .codecs = {"NAU88L25"} > +}; > + > +static struct sst_codecs bxt_codecs = { > + .num_codecs = 1, > + .codecs = {"MX98357A"} > +}; > + > +static struct sst_codecs kbl_poppy_codecs = { > + .num_codecs = 1, > + .codecs = {"10EC5663"} > +}; > > static struct sst_acpi_mach sst_skl_devdata[] = { > { > -- > 1.9.1 >
> -----Original Message----- > From: Koul, Vinod > Sent: Thursday, June 8, 2017 8:59 PM > To: N, Harshapriya <harshapriya.n@intel.com> > Cc: tiwai@suse.de; broonie@kernel.org; alsa-devel@alsa-project.org > Subject: Re: [PATCH v2 2/3] ASoC: Intel: Convert all sst_codecs data defintion > to c99 style > > On Wed, Jun 07, 2017 at 06:27:40PM -0700, Harsha Priya wrote: > > C99 style struct initialization helps in readability as well as > > initialization of variables not specified as NULL. This patch changes > > the struct data defintions in skl.c that were not in c99 style. > > here as well :( Sorry. My bad. I have updated it in the next version I just sent. > > > --- > > sound/soc/intel/skylake/skl.c | 23 +++++++++++++++++++---- > > 1 file changed, 19 insertions(+), 4 deletions(-) > > > > diff --git a/sound/soc/intel/skylake/skl.c > > b/sound/soc/intel/skylake/skl.c index 4ebae85..6a79fc7 100644 > > --- a/sound/soc/intel/skylake/skl.c > > +++ b/sound/soc/intel/skylake/skl.c > > @@ -876,10 +876,25 @@ static void skl_remove(struct pci_dev *pci) > > dev_set_drvdata(&pci->dev, NULL); > > } > > > > -static struct sst_codecs skl_codecs = { 1, {"NAU88L25"} }; -static > > struct sst_codecs kbl_codecs = { 1, {"NAU88L25"} }; -static struct > > sst_codecs bxt_codecs = { 1, {"MX98357A"} }; -static struct sst_codecs > > kbl_poppy_codecs = { 1, {"10EC5663"} }; > > +static struct sst_codecs skl_codecs = { > > + .num_codecs = 1, > > + .codecs = {"NAU88L25"} > > +}; > > + > > +static struct sst_codecs kbl_codecs = { > > + .num_codecs = 1, > > + .codecs = {"NAU88L25"} > > +}; > > + > > +static struct sst_codecs bxt_codecs = { > > + .num_codecs = 1, > > + .codecs = {"MX98357A"} > > +}; > > + > > +static struct sst_codecs kbl_poppy_codecs = { > > + .num_codecs = 1, > > + .codecs = {"10EC5663"} > > +}; > > > > static struct sst_acpi_mach sst_skl_devdata[] = { > > { > > -- > > 1.9.1 > > > > -- > ~Vinod
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index 4ebae85..6a79fc7 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -876,10 +876,25 @@ static void skl_remove(struct pci_dev *pci) dev_set_drvdata(&pci->dev, NULL); } -static struct sst_codecs skl_codecs = { 1, {"NAU88L25"} }; -static struct sst_codecs kbl_codecs = { 1, {"NAU88L25"} }; -static struct sst_codecs bxt_codecs = { 1, {"MX98357A"} }; -static struct sst_codecs kbl_poppy_codecs = { 1, {"10EC5663"} }; +static struct sst_codecs skl_codecs = { + .num_codecs = 1, + .codecs = {"NAU88L25"} +}; + +static struct sst_codecs kbl_codecs = { + .num_codecs = 1, + .codecs = {"NAU88L25"} +}; + +static struct sst_codecs bxt_codecs = { + .num_codecs = 1, + .codecs = {"MX98357A"} +}; + +static struct sst_codecs kbl_poppy_codecs = { + .num_codecs = 1, + .codecs = {"10EC5663"} +}; static struct sst_acpi_mach sst_skl_devdata[] = { {