* [PATCH] soc: qcom: apr: make aprbus const
@ 2024-02-13 14:44 Ricardo B. Marliere
2024-02-13 17:29 ` Greg Kroah-Hartman
2024-02-14 17:57 ` Bjorn Andersson
0 siblings, 2 replies; 3+ messages in thread
From: Ricardo B. Marliere @ 2024-02-13 14:44 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Bjorn Andersson,
Konrad Dybcio
Cc: alsa-devel, linux-arm-msm, linux-kernel, Greg Kroah-Hartman,
Ricardo B. Marliere
Since commit d492cc2573a0 ("driver core: device.h: make struct
bus_type a const *"), the driver core can properly handle constant
struct bus_type, move the aprbus variable to be a constant
structure as well, placing it into read-only memory which can not be
modified at runtime.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
drivers/soc/qcom/apr.c | 2 +-
include/linux/soc/qcom/apr.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/qcom/apr.c b/drivers/soc/qcom/apr.c
index 1f8b315576a4..50749e870efa 100644
--- a/drivers/soc/qcom/apr.c
+++ b/drivers/soc/qcom/apr.c
@@ -399,7 +399,7 @@ static int apr_uevent(const struct device *dev, struct kobj_uevent_env *env)
return add_uevent_var(env, "MODALIAS=apr:%s", adev->name);
}
-struct bus_type aprbus = {
+const struct bus_type aprbus = {
.name = "aprbus",
.match = apr_device_match,
.probe = apr_device_probe,
diff --git a/include/linux/soc/qcom/apr.h b/include/linux/soc/qcom/apr.h
index be98aebcb3e1..7161a3183eda 100644
--- a/include/linux/soc/qcom/apr.h
+++ b/include/linux/soc/qcom/apr.h
@@ -9,7 +9,7 @@
#include <dt-bindings/soc/qcom,apr.h>
#include <dt-bindings/soc/qcom,gpr.h>
-extern struct bus_type aprbus;
+extern const struct bus_type aprbus;
#define APR_HDR_LEN(hdr_len) ((hdr_len)/4)
---
base-commit: f7b0172f074a435a34bc0902b6cdbf1a3e935e27
change-id: 20240213-bus_cleanup-apr-305f89f9058c
Best regards,
--
Ricardo B. Marliere <ricardo@marliere.net>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] soc: qcom: apr: make aprbus const
2024-02-13 14:44 [PATCH] soc: qcom: apr: make aprbus const Ricardo B. Marliere
@ 2024-02-13 17:29 ` Greg Kroah-Hartman
2024-02-14 17:57 ` Bjorn Andersson
1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2024-02-13 17:29 UTC (permalink / raw)
To: Ricardo B. Marliere
Cc: Srinivas Kandagatla, Banajit Goswami, Bjorn Andersson,
Konrad Dybcio, alsa-devel, linux-arm-msm, linux-kernel
On Tue, Feb 13, 2024 at 11:44:01AM -0300, Ricardo B. Marliere wrote:
> Since commit d492cc2573a0 ("driver core: device.h: make struct
> bus_type a const *"), the driver core can properly handle constant
> struct bus_type, move the aprbus variable to be a constant
> structure as well, placing it into read-only memory which can not be
> modified at runtime.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] soc: qcom: apr: make aprbus const
2024-02-13 14:44 [PATCH] soc: qcom: apr: make aprbus const Ricardo B. Marliere
2024-02-13 17:29 ` Greg Kroah-Hartman
@ 2024-02-14 17:57 ` Bjorn Andersson
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2024-02-14 17:57 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Konrad Dybcio,
Ricardo B. Marliere
Cc: alsa-devel, linux-arm-msm, linux-kernel, Greg Kroah-Hartman
On Tue, 13 Feb 2024 11:44:01 -0300, Ricardo B. Marliere wrote:
> Since commit d492cc2573a0 ("driver core: device.h: make struct
> bus_type a const *"), the driver core can properly handle constant
> struct bus_type, move the aprbus variable to be a constant
> structure as well, placing it into read-only memory which can not be
> modified at runtime.
>
>
> [...]
Applied, thanks!
[1/1] soc: qcom: apr: make aprbus const
commit: d2e8899de71cd0a3c22a0eadfb9d54604d34eb96
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-14 17:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-13 14:44 [PATCH] soc: qcom: apr: make aprbus const Ricardo B. Marliere
2024-02-13 17:29 ` Greg Kroah-Hartman
2024-02-14 17:57 ` Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox