projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc5abc2
)
hwmon: (core) Make hwmon_class const
author
Thomas Weißschuh
<linux@weissschuh.net>
Thu, 13 Jun 2024 23:01:42 +0000
(
01:01
+0200)
committer
Guenter Roeck
<linux@roeck-us.net>
Thu, 13 Jun 2024 23:44:34 +0000
(16:44 -0700)
Now that the driver core allows for struct class to be in read-only
memory, mark hwmon_class as const.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link:
https://lore.kernel.org/r/20240614-class-const-hwmon-v1-1-27b910d06a90@weissschuh.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/hwmon.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hwmon/hwmon.c
b/drivers/hwmon/hwmon.c
index 8aee253b5829e9ddd6dbdce24e2744a078ef6a1d..a362080d41fa825dca23f484ce642bd442d0c1be 100644
(file)
--- a/
drivers/hwmon/hwmon.c
+++ b/
drivers/hwmon/hwmon.c
@@
-137,7
+137,7
@@
static void hwmon_dev_release(struct device *dev)
kfree(hwdev);
}
-static struct class hwmon_class = {
+static
const
struct class hwmon_class = {
.name = "hwmon",
.dev_groups = hwmon_dev_attr_groups,
.dev_release = hwmon_dev_release,