summaryrefslogtreecommitdiff
path: root/include/linux/kobject.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-10-21 10:23:10 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-10-22 10:55:19 +0300
commit3d24903a6dd27ab817b4c6c24bee245ff06f7c8e (patch)
treec33e0cf9a080dad4d87b433394e081236ca4d763 /include/linux/kobject.h
parent33a0a1e3b3d17445832177981dc7a1c6a5b009f8 (diff)
downloadlinux-3d24903a6dd27ab817b4c6c24bee245ff06f7c8e.tar.xz
kobject: make get_ktype() take a const pointer
get_ktype() does not modify the structure passed to it, so mark the parameter as being const to allow other const structures to be passed to it in the future. Cc: "Rafael J. Wysocki" <rafael@kernel.org> Link: https://lore.kernel.org/r/20221021072310.3931690-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r--include/linux/kobject.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 592f9785b058..fc40fc81aeb1 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -198,7 +198,7 @@ static inline void kset_put(struct kset *k)
kobject_put(&k->kobj);
}
-static inline const struct kobj_type *get_ktype(struct kobject *kobj)
+static inline const struct kobj_type *get_ktype(const struct kobject *kobj)
{
return kobj->ktype;
}