power: supply: ab8500: Constify struct kobj_type
authorHongbo Li <lihongbo22@huawei.com>
Wed, 4 Sep 2024 01:14:34 +0000 (09:14 +0800)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Thu, 5 Sep 2024 14:30:44 +0000 (16:30 +0200)
commiteb1ea1351da0196e355391b4aa7f8a58536f16e6
treef1ea244e890db7513e95af171006842c0b62b37a
parent48f703d6a3d7cf345fe9c6209ea3703fe9024628
power: supply: ab8500: Constify struct kobj_type

This 'struct kobj_type' is not modified. It is only used in
kobject_init_and_add() which takes a 'const struct kobj_type *ktype'
parameter.

Constifying this structure and moving it to a read-only section,
and can increase over all security.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://lore.kernel.org/r/20240904011434.2010118-1-lihongbo22@huawei.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ab8500_fg.c