From: Greg Kroah-Hartman Date: Fri, 21 Oct 2022 07:23:10 +0000 (+0200) Subject: kobject: make get_ktype() take a const pointer X-Git-Tag: v6.6.17~5899^2~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d24903a6dd27ab817b4c6c24bee245ff06f7c8e;p=platform%2Fkernel%2Flinux-rpi.git 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" Link: https://lore.kernel.org/r/20221021072310.3931690-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 592f978..fc40fc8 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; }