linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] siox: Move some complexity into the core
@ 2024-02-19  7:46 Uwe Kleine-König
  2024-02-19  7:46 ` [PATCH 1/4] siox: Don't pass the reference on a master in siox_master_register() Uwe Kleine-König
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Uwe Kleine-König @ 2024-02-19  7:46 UTC (permalink / raw)
  To: Thorsten Scherer; +Cc: Pengutronix Kernel Team, linux-kernel

Hello,

the reference handling in siox is a bit strange. With
siox_master_alloc() to get a reference on the master that is passed to
the core calling siox_master_register(). So until siox_master_register()
is called successfully the driver has to call siox_master_put() in the
error path, but on remove siox_master_unregister cares for that. While
that technically works, it's unusual and surprising to use. This serie's
first patch cleans that up and then introduces devm functions to make it
even easier to use.

A nice (and intended) side effect is that the gpio bus driver gets rid
of it's remove callback, so I don't have to adapt it for my quest that
changes the prototype of .remove().

Best regards
Uwe

Uwe Kleine-König (4):
  siox: Don't pass the reference on a master in siox_master_register()
  siox: Provide a devm variant of siox_master_alloc()
  siox: Provide a devm variant of siox_master_register()
  siox: bus-gpio: Simplify using devm_siox_* functions

 drivers/siox/siox-bus-gpio.c | 62 ++++++++++++------------------------
 drivers/siox/siox-core.c     | 45 ++++++++++++++++++++++++++
 drivers/siox/siox.h          |  4 +++
 3 files changed, 69 insertions(+), 42 deletions(-)


base-commit: d37e1e4c52bc60578969f391fb81f947c3e83118
-- 
2.43.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-03-23  9:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19  7:46 [PATCH 0/4] siox: Move some complexity into the core Uwe Kleine-König
2024-02-19  7:46 ` [PATCH 1/4] siox: Don't pass the reference on a master in siox_master_register() Uwe Kleine-König
2024-02-19  7:46 ` [PATCH 2/4] siox: Provide a devm variant of siox_master_alloc() Uwe Kleine-König
2024-03-07  7:13   ` Uwe Kleine-König
2024-03-07  7:29     ` Greg Kroah-Hartman
2024-03-07  8:38       ` Uwe Kleine-König
2024-03-08 21:20         ` [PULL] siox changes for 6.9 Uwe Kleine-König
2024-03-16  7:37           ` Uwe Kleine-König
2024-03-22  7:22             ` Uwe Kleine-König
2024-03-22  7:31               ` Greg Kroah-Hartman
2024-03-23  9:21                 ` Uwe Kleine-König
2024-02-19  7:46 ` [PATCH 3/4] siox: Provide a devm variant of siox_master_register() Uwe Kleine-König
2024-02-19  7:46 ` [PATCH 4/4] siox: bus-gpio: Simplify using devm_siox_* functions Uwe Kleine-König
2024-02-27 10:21 ` [PATCH 0/4] siox: Move some complexity into the core Thorsten Scherer
2024-03-06 18:24   ` siox patches for next development cycle [Re: [PATCH 0/4] siox: Move some complexity into the core] Uwe Kleine-König
2024-03-06 21:34     ` Stephen Rothwell
2024-03-06 22:46     ` Greg Kroah-Hartman
2024-03-07  7:08       ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).