Skip to content

Commit 3b5eba5

Browse files
rbmarlieregregkh
authored andcommitted
perf: make pmu_bus const
Now that the driver core can properly handle constant struct bus_type, move the pmu_bus 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> Acked-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20240204-bus_cleanup-events-v1-1-c779d1639c3a@marliere.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d4a5d39 commit 3b5eba5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/events/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12216,7 +12216,7 @@ static const struct attribute_group *pmu_dev_groups[] = {
1221612216
};
1221712217

1221812218
static int pmu_bus_running;
12219-
static struct bus_type pmu_bus = {
12219+
static const struct bus_type pmu_bus = {
1222012220
.name = "event_source",
1222112221
.dev_groups = pmu_dev_groups,
1222212222
};

0 commit comments

Comments
 (0)