mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 08:21:14 +00:00
30 lines
972 B
Diff
30 lines
972 B
Diff
|
From d460e8c1272c886639cbc1a5b054a980007dadc3 Mon Sep 17 00:00:00 2001
|
||
|
From: Matt Flax <flatmax@flatmax.org>
|
||
|
Date: Sun, 27 Mar 2022 22:42:47 +1100
|
||
|
Subject: [PATCH] audioinjector.net: stereo and zero, use
|
||
|
dev_err_probe, report success
|
||
|
|
||
|
Use dev_err_probe to follow best practice, and leave a message in
|
||
|
the kernel log indicate the driver was started successfully.
|
||
|
---
|
||
|
sound/soc/bcm/audioinjector-pi-soundcard.c | 8 +++++---
|
||
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
||
|
|
||
|
--- a/sound/soc/bcm/audioinjector-pi-soundcard.c
|
||
|
+++ b/sound/soc/bcm/audioinjector-pi-soundcard.c
|
||
|
@@ -158,9 +158,11 @@ static int audioinjector_pi_soundcard_pr
|
||
|
}
|
||
|
}
|
||
|
|
||
|
- if ((ret = devm_snd_soc_register_card(&pdev->dev, card))) {
|
||
|
- dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
|
||
|
- }
|
||
|
+ if ((ret = devm_snd_soc_register_card(&pdev->dev, card)))
|
||
|
+ return dev_err_probe(&pdev->dev, ret, "%s\n", __func__);
|
||
|
+
|
||
|
+ dev_info(&pdev->dev, "successfully loaded\n");
|
||
|
+
|
||
|
return ret;
|
||
|
}
|
||
|
|