[alsa-devel] [PATCH 5/7] ASoC: ts3a227e: add acpi table

Vinod Koul vinod.koul at intel.com
Mon Sep 18 05:36:09 CEST 2017


On Fri, Sep 08, 2017 at 08:30:37AM -0500, Pierre-Louis Bossart wrote:
> 
> >>+#ifdef CONFIG_ACPI
> >>+static struct acpi_device_id ts3a227e_acpi_match[] = {
> >>+	{ "104C227E", 0 },
> >>+	{},
> >>+};
> >>+MODULE_DEVICE_TABLE(acpi, ts3a227e_acpi_match);
> >>+#endif
> >
> >so this is not present for non ACPI system,... fine
> >
> >>+
> >>  static struct i2c_driver ts3a227e_driver = {
> >>  	.driver = {
> >>  		.name = "ts3a227e",
> >>  		.pm = &ts3a227e_pm,
> >>  		.of_match_table = of_match_ptr(ts3a227e_of_match),
> >>+		.acpi_match_table = ACPI_PTR(ts3a227e_acpi_match),
> >
> >but then this would give compiler error on those systems as .acpi_match_table is
> >defined in driver core... can you compile this on non acpi and check
> 
> This is not any different from what is done for other codecs.
> 
> static struct i2c_driver rt5677_i2c_driver = {
> 	.driver = {
> 		.name = "rt5677",
> 		.of_match_table = rt5677_of_match,
> 		.acpi_match_table = ACPI_PTR(rt5677_acpi_match),
> 	},
> 
> And the 0day checks did not report any issues, probably because the
> pre-processor takes the table out when CONFIG_ACPI is not enabled:
> 
> #define ACPI_PTR(_ptr)	(NULL)

Yeah thanks for pointing, missed this one :)

> so no change...

yup :)

-- 
~Vinod


More information about the Alsa-devel mailing list