2022-09-14 07:11:34

by Huang Yiwei

[permalink] [raw]
Subject: [PATCH v2] interconnect: qcom: Kconfig: Make INTERCONNECT_QCOM tristate

Make INTERCONNECT_QCOM tristate so that icc-common.c can be
compiled as a module.

Signed-off-by: Huang Yiwei <[email protected]>
---
drivers/interconnect/qcom/Kconfig | 2 +-
drivers/interconnect/qcom/icc-common.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/interconnect/qcom/Kconfig b/drivers/interconnect/qcom/Kconfig
index 25d5b4baf6f6..1a1c941635a2 100644
--- a/drivers/interconnect/qcom/Kconfig
+++ b/drivers/interconnect/qcom/Kconfig
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
config INTERCONNECT_QCOM
- bool "Qualcomm Network-on-Chip interconnect drivers"
+ tristate "Qualcomm Network-on-Chip interconnect drivers"
depends on ARCH_QCOM
help
Support for Qualcomm's Network-on-Chip interconnect hardware.
diff --git a/drivers/interconnect/qcom/icc-common.c b/drivers/interconnect/qcom/icc-common.c
index 0822ce207b5d..f27f4fdc4531 100644
--- a/drivers/interconnect/qcom/icc-common.c
+++ b/drivers/interconnect/qcom/icc-common.c
@@ -5,6 +5,7 @@

#include <linux/of.h>
#include <linux/slab.h>
+#include <linux/module.h>

#include "icc-common.h"

@@ -32,3 +33,5 @@ struct icc_node_data *qcom_icc_xlate_extended(struct of_phandle_args *spec, void
return ndata;
}
EXPORT_SYMBOL_GPL(qcom_icc_xlate_extended);
+
+MODULE_LICENSE("GPL");
--
2.17.1


2022-09-14 14:40:08

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v2] interconnect: qcom: Kconfig: Make INTERCONNECT_QCOM tristate

On Wed, Sep 14, 2022 at 02:41:22PM +0800, Huang Yiwei wrote:
> Make INTERCONNECT_QCOM tristate so that icc-common.c can be
> compiled as a module.
>
> Signed-off-by: Huang Yiwei <[email protected]>

Looks like this could be useful to other platforms that need of_xlate
with tags, so we should be able to push this helper into the
interconnect core and get rid of icc-common.c.

But in the meantime, I like your change.

Reviewed-by: Bjorn Andersson <[email protected]>

Regards,
Bjorn

> ---
> drivers/interconnect/qcom/Kconfig | 2 +-
> drivers/interconnect/qcom/icc-common.c | 3 +++
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/interconnect/qcom/Kconfig b/drivers/interconnect/qcom/Kconfig
> index 25d5b4baf6f6..1a1c941635a2 100644
> --- a/drivers/interconnect/qcom/Kconfig
> +++ b/drivers/interconnect/qcom/Kconfig
> @@ -1,6 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0-only
> config INTERCONNECT_QCOM
> - bool "Qualcomm Network-on-Chip interconnect drivers"
> + tristate "Qualcomm Network-on-Chip interconnect drivers"
> depends on ARCH_QCOM
> help
> Support for Qualcomm's Network-on-Chip interconnect hardware.
> diff --git a/drivers/interconnect/qcom/icc-common.c b/drivers/interconnect/qcom/icc-common.c
> index 0822ce207b5d..f27f4fdc4531 100644
> --- a/drivers/interconnect/qcom/icc-common.c
> +++ b/drivers/interconnect/qcom/icc-common.c
> @@ -5,6 +5,7 @@
>
> #include <linux/of.h>
> #include <linux/slab.h>
> +#include <linux/module.h>
>
> #include "icc-common.h"
>
> @@ -32,3 +33,5 @@ struct icc_node_data *qcom_icc_xlate_extended(struct of_phandle_args *spec, void
> return ndata;
> }
> EXPORT_SYMBOL_GPL(qcom_icc_xlate_extended);
> +
> +MODULE_LICENSE("GPL");
> --
> 2.17.1
>