diff mbox

[07/11] ASoC: qdsp6: q6afe-dai: support dt based module loading

Message ID 20180625143115.8346-8-srinivas.kandagatla@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Srinivas Kandagatla June 25, 2018, 2:31 p.m. UTC
This patch uses new compatible string to make DT based module loading work.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6afe-dai.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Niklas Cassel June 25, 2018, 6:03 p.m. UTC | #1
On Mon, Jun 25, 2018 at 03:31:11PM +0100, Srinivas Kandagatla wrote:
> This patch uses new compatible string to make DT based module loading work.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/qdsp6/q6afe-dai.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c
> index 5002dd05bf27..7fbf762a45ac 100644
> --- a/sound/soc/qcom/qdsp6/q6afe-dai.c
> +++ b/sound/soc/qcom/qdsp6/q6afe-dai.c
> @@ -1290,9 +1290,17 @@ static int q6afe_dai_dev_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static const struct of_device_id q6afe_dai_device_id[]  = {

Double space here.

> +	{ .compatible = "qcom,q6afe-dais" },
> +	{},
> +};
> +

Usually there is no empty line between the table and MODULE_DEVICE_TABLE.

> +MODULE_DEVICE_TABLE(of, q6afe_dai_device_id);
> +
>  static struct platform_driver q6afe_dai_platform_driver = {
>  	.driver = {
>  		.name = "q6afe-dai",
> +		.of_match_table = of_match_ptr(q6afe_dai_device_id),
>  	},
>  	.probe = q6afe_dai_dev_probe,
>  	.remove = q6afe_dai_dev_remove,
> -- 
> 2.16.2
> 

I'm not sure if Rob agrees with me or not,
but since this patch is less than 10 lines,
I think that it would be simpler to review
if it was squashed together with the patch
adding the compatible to the DT binding.
Srinivas Kandagatla June 26, 2018, 8:56 a.m. UTC | #2
On 25/06/18 19:03, Niklas Cassel wrote:
>> +
> Usually there is no empty line between the table and MODULE_DEVICE_TABLE.
> 
Sure, will do!

thanks,
srini
diff mbox

Patch

diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c
index 5002dd05bf27..7fbf762a45ac 100644
--- a/sound/soc/qcom/qdsp6/q6afe-dai.c
+++ b/sound/soc/qcom/qdsp6/q6afe-dai.c
@@ -1290,9 +1290,17 @@  static int q6afe_dai_dev_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id q6afe_dai_device_id[]  = {
+	{ .compatible = "qcom,q6afe-dais" },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, q6afe_dai_device_id);
+
 static struct platform_driver q6afe_dai_platform_driver = {
 	.driver = {
 		.name = "q6afe-dai",
+		.of_match_table = of_match_ptr(q6afe_dai_device_id),
 	},
 	.probe = q6afe_dai_dev_probe,
 	.remove = q6afe_dai_dev_remove,