Attention is currently required from: Thomas Heijligen, Angel Pons, Anastasia Klimchuk. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/56103 )
Change subject: spi_master: Use new API to register shutdown function ......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
I have a message to reviewers, thank you!
- I don't know how to build ni845x_spi
This is Miklós' arcane knowledge :)
- raiden_debug_spi is left for now, it has different data used in register_spi_master vs register_shutdown
Oh, this one looks funny. The data free'd in the shutdown function is the master struct itself :) So what we would actually need is a field in `data` pointing back to the master. Currently it's free'd like this (where `spi_master` is currently called `spi_config` in the code):
free(spi_master->data) free(spi_master)
If we add a pointer to `data`, pointing to the master, we could turn it around:
free(data->master) free(data)
And then we could use the same `data` pointer everwhere.