On Sat May 30, 2026 at 10:31 PM CEST, Markus Probst wrote: > On Sat, 2026-05-30 at 21:45 +0200, Danilo Krummrich wrote: >> On Sat May 30, 2026 at 8:55 PM CEST, Markus Probst wrote: >> > pin-init doesn't have enum support yet, so at least in my driver devres is >> > still required for now. >> >> Hm...how is this related to having a registration type that takes a lifetime >> rather than a registration type being wrapped in Devres? > In order to register "optional" devices, the driver currently uses > devres::register. > > I just released I could use KBox for this.
Ah, so you basically use devres::register() to avoid a pinned Option. Let's not absuse devres for this. The class device registration should rather use a lifetime now that we got all the infrastructure for this; the pinned Option problem can be tackled otherwise.
