On 12/14/2017 09:34 AM, srinivas.kandagatla@xxxxxxxxxx wrote:
From: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c
new file mode 100644
index 000000000000..5b2036317f71
--- /dev/null
+++ b/sound/soc/qcom/apq8096.c
@@ -0,0 +1,124 @@
Will remove it in next version.+ */
+#include <linux/clk.h>
No clk usage though?
+#include <linux/platform_device.h>[...]
+#include <linux/module.h>
+#include <linux/of_device.h>
+#include <sound/soc.h>
+static int apq8096_sbc_parse_of(struct snd_soc_card *card)
+{
+ struct device *dev = card->dev;
+ int ret;
+
+ ret = snd_soc_of_parse_card_name(card, "qcom,model");
+ if (ret)
+ dev_err(dev, "Error parsing card name: %d\n", ret);
So this prints an error, and the caller also prints an error when it
fails. Double error messages?
+
+ return ret;
+}
+
+static int msm_snd_apq8096_probe(struct platform_device *pdev)
+{
+ int ret;
+ struct snd_soc_card *card;
+
+ card = devm_kzalloc(&pdev->dev, sizeof(*card), GFP_KERNEL);
+ if (!card)
+ return -ENOMEM;
+
+ card->dev = &pdev->dev;
+
+ ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32));
Why do we need to do this? Can you add some sort of comment in the code
about why?