summaryrefslogtreecommitdiffstats
path: root/sound/soc/meson/t9015.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 17:45:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 17:45:30 +0000
commit01db417e0aee3e51df4f5f3775535fd1fb15e329 (patch)
tree12d419efb27541c39ef63831e0d899339ecfef4f /sound/soc/meson/t9015.c
parentAdding debian version 5.10.209-2. (diff)
downloadlinux-01db417e0aee3e51df4f5f3775535fd1fb15e329.tar.xz
linux-01db417e0aee3e51df4f5f3775535fd1fb15e329.zip
Merging upstream version 5.10.216.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sound/soc/meson/t9015.c')
-rw-r--r--sound/soc/meson/t9015.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/sound/soc/meson/t9015.c b/sound/soc/meson/t9015.c
index 56d2592c1..b085aa65c 100644
--- a/sound/soc/meson/t9015.c
+++ b/sound/soc/meson/t9015.c
@@ -48,7 +48,6 @@
#define POWER_CFG 0x10
struct t9015 {
- struct clk *pclk;
struct regulator *avdd;
};
@@ -250,6 +249,7 @@ static int t9015_probe(struct platform_device *pdev)
struct t9015 *priv;
void __iomem *regs;
struct regmap *regmap;
+ struct clk *pclk;
int ret;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -257,31 +257,13 @@ static int t9015_probe(struct platform_device *pdev)
return -ENOMEM;
platform_set_drvdata(pdev, priv);
- priv->pclk = devm_clk_get(dev, "pclk");
- if (IS_ERR(priv->pclk)) {
- if (PTR_ERR(priv->pclk) != -EPROBE_DEFER)
- dev_err(dev, "failed to get core clock\n");
- return PTR_ERR(priv->pclk);
- }
+ pclk = devm_clk_get_enabled(dev, "pclk");
+ if (IS_ERR(pclk))
+ return dev_err_probe(dev, PTR_ERR(pclk), "failed to get core clock\n");
priv->avdd = devm_regulator_get(dev, "AVDD");
- if (IS_ERR(priv->avdd)) {
- if (PTR_ERR(priv->avdd) != -EPROBE_DEFER)
- dev_err(dev, "failed to AVDD\n");
- return PTR_ERR(priv->avdd);
- }
-
- ret = clk_prepare_enable(priv->pclk);
- if (ret) {
- dev_err(dev, "core clock enable failed\n");
- return ret;
- }
-
- ret = devm_add_action_or_reset(dev,
- (void(*)(void *))clk_disable_unprepare,
- priv->pclk);
- if (ret)
- return ret;
+ if (IS_ERR(priv->avdd))
+ return dev_err_probe(dev, PTR_ERR(priv->avdd), "failed to AVDD\n");
ret = device_reset(dev);
if (ret) {