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: stable@vger.kernel.org
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Link: https://lore.kernel.org/r/20230713112112.778576-1-thomas.petazzoni@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-11 11:53:54 +02:00
..
adi
amd
atmel
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
mxs
pxa ASoC: pxa: fix null-pointer dereference in filter() 2023-01-18 11:41:03 +01:00
qcom
rockchip ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rk_spdif_runtime_resume() 2023-01-18 11:41:40 +01:00
samsung
sh
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
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
soc-dai.c
soc-dapm.c
soc-devres.c
soc-generic-dmaengine-pcm.c
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
soc-utils.c