ASoC: samsung: Use iio_get_channel_type() accessor.
Subsystems (4)
PATCH 1/1 ASoC: samsung: Use iio_get_channel_type() accessor.
From: Jonathan Cameron <[email protected]>
struct iio_chan_spec is meant to be opaque to IIO consumer drivers which should only use the interfaces in linux/iio/consumer.h. Use the provided accessor function to find get the type of the channel instead of directly reading it form the structure.
--- sound/soc/samsung/aries_wm8994.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
sound/soc/samsung/aries_wm8994.c +6 -2
@@ -1,7 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ #include <linux/extcon.h> #include <linux/iio/consumer.h> -#include <linux/iio/iio.h> #include <linux/input-event-codes.h> #include <linux/mfd/wm8994/registers.h> #include <linux/module.h>
@@ -543,6 +542,7 @@ static int aries_audio_probe(struct platform_device *pdev)struct aries_wm8994_data *priv;struct snd_soc_dai_link *dai_link;const struct of_device_id *match; +enum iio_chan_type channel_type;int ret, i;if (!np)
@@ -594,7 +594,11 @@ static int aries_audio_probe(struct platform_device *pdev)return dev_err_probe (dev,PTR_ERR (priv->adc),"Failed to get ADC channel" ); -if (priv->adc->channel->type !=IIO_VOLTAGE ) + ret =iio_get_channel_type (priv->adc, &channel_type); +if (ret) +return dev_err_probe (dev, ret, +"Failed to get ADC channel type" ); +if (channel_type !=IIO_VOLTAGE )return -EINVAL ; priv->gpio_headset_key = devm_gpiod_get(dev, "headset-key",
Signature · 1 line
2.37.2
Mark Brown
maintainerQuoted 8 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
struct
iio_chan_specis meant to be opaque to IIO consumer drivers which should only use the interfaces inlinux/iio/consumer.h. Use the provided accessor function to find get the type of the channel instead of directly reading it form the structure.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: samsung: Use iio_get_channel_type() accessor.
commit: 94f072748337424c9cf92cd018532a34db3a5516
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark