Re: [PATCH v2 11/11] ASoC: codecs: add Qualcomm Tambora (WCD9378) SDCA codec

From: Uwe Kleine-König

Date: Tue Sep 08 2026 - 16:00:40 EST


Hello,

On Mon, Sep 07, 2026 at 09:37:25AM +0100, Srinivas Kandagatla wrote:
> +#include <linux/mod_devicetable.h>

Please don't include <linux/mod_devicetable.h>. Either rely on
<linux/soundwire/sdw.h> to provide sdw_device_id (my preferred way), or
(if you want full iwyu) include <linux/device-id/sdw.h>.

> [...]
> +static const struct sdw_device_id wcd9378_sdw_id[] = {
> + SDW_SLAVE_ENTRY(0x0217, 0x0110, 0),
> + {}
> +};

s/{}/{ }/ please to match the common style.

> +MODULE_DEVICE_TABLE(sdw, wcd9378_sdw_id);
> +
> +static struct sdw_driver wcd9378_sdw_driver = {
> + .driver = {
> + .name = "wcd9378",
> + .pm = pm_ptr(&wcd9378_sdw_pm_ops),
> + },
> + .probe = wcd9378_sdca_probe,
> + .remove = wcd9378_sdca_remove,
> + .id_table = wcd9378_sdw_id,
> + .ops = &wcd9378_sdw_ops,
> +};

subjective feedback: I'm not a fan of aligning the = in such
initialisations. They tend to get inconsistent over time, and sometimes
(like here) they even start inconsistently. So if you ask me, use a
single space before each =.

> +module_sdw_driver(wcd9378_sdw_driver);
> +
> +MODULE_DESCRIPTION("Qualcomm WCD9378 (Tambora) SoundWire codec");
> +MODULE_AUTHOR("Qualcomm Technologies, Inc.");
> +MODULE_LICENSE("Dual BSD/GPL");
> +MODULE_IMPORT_NS("SND_SOC_SDCA");
> +MODULE_IMPORT_NS("SND_SOC_SDCA_CLASS");

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature