[PATCH 1/3] misc: cros_ec: Staticize and constify driver ops
Marek Vasut
marek.vasut at mailbox.org
Fri May 8 19:37:40 CEST 2026
On 5/8/26 7:01 PM, Simon Glass wrote:
Hello Simon,
>> -struct dm_cros_ec_ops cros_ec_ops = {
>> +static const struct dm_cros_ec_ops cros_ec_ops = {
>> .packet = cros_ec_sandbox_packet,
>> .get_switches = cros_ec_sandbox_get_switches,
>> };
>
> Only the sandbox driver is touched - you could do cros_ec_i2c.c,
> cros_ec_lpc.c and cros_ec_spi.c as well if you like.
There is 220 sites which do static struct which can be switched to
static const struct. I'll do that after I am done with this series, and
then with ACPI_OPS_PTR series. Ugh ... I think I will be sending a lot
more patches.
> BTW dm_cros_ec_get_ops() in include/cros_ec.h casts the ops pointer
> back to non-const!
And this one too, I made a commit locally and will submit this later,
once I am done with this series. I don't want to flood the ML.
More information about the U-Boot
mailing list