diff options
Diffstat (limited to 'sound/soc/codecs/cx20442.c')
| -rw-r--r-- | sound/soc/codecs/cx20442.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c index ab174b5114dc..d6121c0a2616 100644 --- a/sound/soc/codecs/cx20442.c +++ b/sound/soc/codecs/cx20442.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * cx20442.c -- CX20442 ALSA Soc Audio driver * @@ -6,11 +7,6 @@ * Initially based on sound/soc/codecs/wm8400.c * Copyright 2008, 2009 Wolfson Microelectronics PLC. * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. */ #include <linux/tty.h> @@ -210,7 +206,7 @@ static int cx20442_write(struct snd_soc_component *component, unsigned int reg, */ /* Modem init: echo off, digital speaker off, quiet off, voice mode */ -static const char *v253_init = "ate0m0q0+fclass=8\r"; +static const char v253_init[] = "ate0m0q0+fclass=8\r"; /* Line discipline .open() */ static int v253_open(struct tty_struct *tty) @@ -256,15 +252,14 @@ static void v253_close(struct tty_struct *tty) } /* Line discipline .hangup() */ -static int v253_hangup(struct tty_struct *tty) +static void v253_hangup(struct tty_struct *tty) { v253_close(tty); - return 0; } /* Line discipline .receive_buf() */ -static void v253_receive(struct tty_struct *tty, - const unsigned char *cp, char *fp, int count) +static void v253_receive(struct tty_struct *tty, const u8 *cp, const u8 *fp, + size_t count) { struct snd_soc_component *component = tty->disc_data; struct cx20442_priv *cx20442; @@ -283,20 +278,13 @@ static void v253_receive(struct tty_struct *tty, } } -/* Line discipline .write_wakeup() */ -static void v253_wakeup(struct tty_struct *tty) -{ -} - struct tty_ldisc_ops v253_ops = { - .magic = TTY_LDISC_MAGIC, .name = "cx20442", .owner = THIS_MODULE, .open = v253_open, .close = v253_close, .hangup = v253_hangup, .receive_buf = v253_receive, - .write_wakeup = v253_wakeup, }; EXPORT_SYMBOL_GPL(v253_ops); @@ -327,11 +315,12 @@ static int cx20442_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { struct cx20442_priv *cx20442 = snd_soc_component_get_drvdata(component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); int err = 0; switch (level) { case SND_SOC_BIAS_PREPARE: - if (snd_soc_component_get_bias_level(component) != SND_SOC_BIAS_STANDBY) + if (snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_STANDBY) break; if (IS_ERR(cx20442->por)) err = PTR_ERR(cx20442->por); @@ -339,7 +328,7 @@ static int cx20442_set_bias_level(struct snd_soc_component *component, err = regulator_enable(cx20442->por); break; case SND_SOC_BIAS_STANDBY: - if (snd_soc_component_get_bias_level(component) != SND_SOC_BIAS_PREPARE) + if (snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_PREPARE) break; if (IS_ERR(cx20442->por)) err = PTR_ERR(cx20442->por); @@ -423,7 +412,6 @@ static const struct snd_soc_component_driver cx20442_component_dev = { .idle_bias_on = 1, .use_pmdown_time = 1, .endianness = 1, - .non_legacy_dai_naming = 1, }; static int cx20442_platform_probe(struct platform_device *pdev) |
