android_kernel_motorola_sm6375/sound/soc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Thomas Petazzoni 6e4aa8c890 ASoC: cs42l51: fix driver to properly autoload with automatic module loading
commit e51df4f81b02bcdd828a04de7c1eb6a92988b61e upstream.

In commit 2cb1e0259f ("ASoC: cs42l51: re-hook of_match_table
pointer"), 9 years ago, some random guy fixed the cs42l51 after it was
split into a core part and an I2C part to properly match based on a
Device Tree compatible string.

However, the fix in this commit is wrong: the MODULE_DEVICE_TABLE(of,
....) is in the core part of the driver, not the I2C part. Therefore,
automatic module loading based on module.alias, based on matching with
the DT compatible string, loads the core part of the driver, but not
the I2C part. And threfore, the i2c_driver is not registered, and the
codec is not known to the system, nor matched with a DT node with the
corresponding compatible string.

In order to fix that, we move the MODULE_DEVICE_TABLE(of, ...) into
the I2C part of the driver. The cs42l51_of_match[] array is also moved
as well, as it is not possible to have this definition in one file,
and the MODULE_DEVICE_TABLE(of, ...) invocation in another file, due
to how MODULE_DEVICE_TABLE works.

Thanks to this commit, the I2C part of the driver now properly
autoloads, and thanks to its dependency on the core part, the core
part gets autoloaded as well, resulting in a functional sound card
without having to manually load kernel modules.

Fixes: 2cb1e0259f ("ASoC: cs42l51: re-hook of_match_table pointer")
Cc: [email protected]
Signed-off-by: Thomas Petazzoni <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-08-11 11:53:54 +02:00
..
adi
amd
atmel ASoC: atmel: Remove system clock tree configuration for at91sam9g20ek 2022-04-27 13:50:46 +02:00
au1x
bcm
cirrus
codecs ASoC: cs42l51: fix driver to properly autoload with automatic module loading 2023-08-11 11:53:54 +02:00
dwc ASoC: dwc: limit the number of overrun messages 2023-06-09 10:28:56 +02:00
fsl ASoC: fsl_spdif: Silence output on stop 2023-08-11 11:53:49 +02:00
generic ASoC: audio-graph-card: fix refcount leak of cpu_ep in __graph_for_each_link() 2023-01-18 11:41:40 +01:00
hisilicon
img
intel ASoC: Intel: bytcr_rt5640: Add quirk for the Acer Iconia One 7 B1-750 2023-05-17 11:35:31 +02:00
jz4740
kirkwood ASoC: kirkwood: Iterate over array indexes instead of using pointer math 2023-03-11 16:43:57 +01:00
mediatek ASoC: mediatek: mt8173-rt5650-rt5514: fix refcount leak in mt8173_rt5650_rt5514_dev_probe() 2023-01-18 11:41:39 +01:00
meson ASoC: meson: Fix event generation for G12A tohdmi mux 2022-05-12 12:23:42 +02:00
mxs ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe 2022-06-14 18:11:36 +02:00
pxa ASoC: pxa: fix null-pointer dereference in filter() 2023-01-18 11:41:03 +01:00
qcom ASoC: qcom: q6dsp: Fix an off-by-one in q6adm_alloc_copp() 2022-08-25 11:18:05 +02:00
rockchip ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rk_spdif_runtime_resume() 2023-01-18 11:41:40 +01:00
samsung
sh ASoC: rsnd: Add check for rsnd_mod_power_on 2022-10-26 13:22:29 +02:00
sirf
sof ASoC: SOF: Intel: hda-dai: fix possible stream_tag leak 2023-02-22 12:50:42 +01:00
spear
sprd
sti
stm
sunxi
tegra
ti ASoC: ti: davinci-i2s: Add check for clk_enable() 2022-04-15 14:18:08 +02:00
txx9
uniphier
ux500
xilinx
xtensa
zte
Kconfig
Makefile
soc-ac97.c
soc-acpi.c
soc-component.c
soc-compress.c ASoC: soc-compress.c: fixup private_data on snd_soc_new_compress() 2023-03-11 16:43:46 +01:00
soc-core.c ASoC: core: Fix use-after-free in snd_soc_exit() 2022-11-25 17:42:13 +01:00
soc-dai.c
soc-dapm.c ASoC: dapm: Don't fold register value changes into notifications 2022-06-14 18:11:27 +02:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: dmaengine: Restore NULL prepare_slave_config() callback 2022-05-12 12:23:44 +02:00
soc-io.c
soc-jack.c
soc-ops.c ASoC: ops: Correct bounds check for second channel on SX controls 2022-12-19 12:24:16 +01:00
soc-pcm.c ASoC: soc-pcm: Add NULL check in BE reparenting 2022-12-14 11:30:41 +01:00
soc-topology.c ASoC: topology: Allow TLV control to be either read or write 2022-04-15 14:18:30 +02:00
soc-utils.c ASoC: soc-utils: Remove __exit for snd_soc_util_exit() 2022-11-25 17:42:14 +01:00