[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <170889365697.1930401.10570101771941744000.b4-ty@collabora.com>
Date: Sun, 25 Feb 2024 21:40:56 +0100
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Sebastian Reichel <sre@...nel.org>,
"Ricardo B. Marliere" <ricardo@...liere.net>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v2] power: supply: core: constify the struct
device_type usage
On Sat, 24 Feb 2024 17:15:41 -0300, Ricardo B. Marliere wrote:
> Since commit aed65af1cc2f ("drivers: make device_type const"), the driver
> core can properly handle constant struct device_type. Move the
> power_supply_dev_type variable to be a constant structure as well, placing
> it into read-only memory which can not be modified at runtime.
>
> In order to accomplish that, export power_supply_attr_group in
> power_supply.h and use it with the macro __ATTRIBUTE_GROUPS when defining
> power_supply_dev_type in power_supply_core.c. Therefore the attribute group
> is no longer static. Lastly, because power_supply_attr_groups is no longer
> dynamically associated to power_supply_dev_type in
> power_supply_init_attrs(), make the function receive zero arguments.
>
> [...]
Applied, thanks!
[1/1] power: supply: core: constify the struct device_type usage
commit: 7b46b60944d77e361a727cd8ce46aec31c146e26
Best regards,
--
Sebastian Reichel <sebastian.reichel@...labora.com>
Powered by blists - more mailing lists