The controller reference count is not decremented on deregistration if
the controller has been allocated using devm_spi_alloc_host/target().
Amend the kernel-doc for devm_spi_register_controller() and
spi_unregister_controller() so that it reflects this (more recent)
behaviour.
Fixes: 5e844cc37a5c ("spi: Introduce device-managed SPI controller allocation")
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260312151817.32100-6-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
* Context: can sleep
*
* Register a SPI device as with spi_register_controller() which will
- * automatically be unregistered and freed.
+ * automatically be unregistered (and freed unless it has been allocated using
+ * devm_spi_alloc_host/target()).
*
* Return: zero on success, else a negative error code.
*/
*
* This must be called from context that can sleep.
*
- * Note that this function also drops a reference to the controller.
+ * Note that this function also drops a reference to the controller unless it
+ * has been allocated using devm_spi_alloc_host/target().
*/
void spi_unregister_controller(struct spi_controller *ctlr)
{