17 Jun
2019
17 Jun
'19
1:22 p.m.
On Sat, Jun 15, 2019 at 05:04:47PM +0800, derek.fang@realtek.com wrote:
This looks mostly good, a couple of really small things which should be easy to fix:
- return devm_snd_soc_register_component(&i2c->dev,
&soc_component_dev_rt1308,
rt1308_dai, ARRAY_SIZE(rt1308_dai));
+}
+static int rt1308_i2c_remove(struct i2c_client *i2c) +{
- snd_soc_unregister_component(&i2c->dev);
- return 0;
+}
You used devm_snd_soc_register_component() so no need to explicitly unregister and this function can go.
+#if defined(CONFIG_OF)
.of_match_table = rt1308_of_match,
+#endif
of_match_ptr()
+#if defined(CONFIG_ACPI)
.acpi_match_table = ACPI_PTR(rt1308_acpi_match)
+#endif
No need for the ifdef, that's what ACPI_PTR() does.