[PATCH v2] firmware: exynos-acpm: Drop fake 'const' on handle pointer

Krzysztof Kozlowski krzk at kernel.org
Sun Mar 1 04:09:34 PST 2026


On 25/02/2026 15:00, Tudor Ambarus wrote:
>>> static const struct acpm_ops exynos_acpm_driver_ops = {
>>>         .dvfs_ops = {
>>>                 .set_rate = acpm_dvfs_set_rate,
>>>                 .get_rate = acpm_dvfs_get_rate,
>>>         },
>>>         .pmic_ops = {
>>>                 .read_reg = acpm_pmic_read_reg,
>>>                 .write_reg = acpm_pmic_write_reg,
>>>                 // ... other ops
>>>         },
>>> };
>>>
>>> and in probe:
>>> acpm->handle.ops = &exynos_acpm_driver_ops;
>>>
>>> This way, the handle safely reflects the mutability of its container,
>>> but our function pointers remain fully protected.
>>
>> Yes, this makes sense.
>>
> 
> Will you come with a follow up patch or do you want me to ACK this and do
> the follow up patch myself? Both options are fine by mine.

Go ahead with implementing this idea. I cannot test it anyway, so better
if you do it.

Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list