summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_sysfs.h
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-02-09 18:56:48 -0800
committerDarrick J. Wong <djwong@kernel.org>2023-02-10 08:59:48 -0800
commit2ee8333529857a702475ce36d3af3ecbbcf5af5a (patch)
treedaf47038cc2461afc18f6f2f6779d682252bde2d /fs/xfs/xfs_sysfs.h
parent167ce4cbfa370114fee61ad5b58e401d95e2d5cd (diff)
xfs: make kobj_type structures constant
Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definitions to prevent modification at runtime. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_sysfs.h')
-rw-r--r--fs/xfs/xfs_sysfs.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_sysfs.h b/fs/xfs/xfs_sysfs.h
index 513095e353a5..148893ebfdef 100644
--- a/fs/xfs/xfs_sysfs.h
+++ b/fs/xfs/xfs_sysfs.h
@@ -7,10 +7,10 @@
#ifndef __XFS_SYSFS_H__
#define __XFS_SYSFS_H__
-extern struct kobj_type xfs_mp_ktype; /* xfs_mount */
-extern struct kobj_type xfs_dbg_ktype; /* debug */
-extern struct kobj_type xfs_log_ktype; /* xlog */
-extern struct kobj_type xfs_stats_ktype; /* stats */
+extern const struct kobj_type xfs_mp_ktype; /* xfs_mount */
+extern const struct kobj_type xfs_dbg_ktype; /* debug */
+extern const struct kobj_type xfs_log_ktype; /* xlog */
+extern const struct kobj_type xfs_stats_ktype; /* stats */
static inline struct xfs_kobj *
to_kobj(struct kobject *kobject)
@@ -28,7 +28,7 @@ xfs_sysfs_release(struct kobject *kobject)
static inline int
xfs_sysfs_init(
struct xfs_kobj *kobj,
- struct kobj_type *ktype,
+ const struct kobj_type *ktype,
struct xfs_kobj *parent_kobj,
const char *name)
{