Re: [PATCH V11 13/15] rust: cpufreq: Extend abstractions for driver registration

From: Danilo Krummrich
Date: Thu Apr 24 2025 - 04:04:08 EST


On 4/24/25 8:29 AM, Viresh Kumar wrote:
On 23-04-25, 14:08, Danilo Krummrich wrote:
On 4/21/25 9:22 AM, Viresh Kumar wrote:

+ /// Same as [`Registration::new`], but does not return a [`Registration`] instance.
+ ///
+ /// Instead the [`Registration`] is owned by [`Devres`] and will be revoked / dropped, once the
+ /// device is detached.
+ pub fn new_foreign_owned(dev: &Device) -> Result<()> {
+ Devres::new_foreign_owned(dev, Self::new()?, GFP_KERNEL)
+ }

Btw. if you take it for v6.16-rc1, expect a conflict with [1].

[1] https://web.git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git/commit/?h=driver-core-next&id=f720efda2db5e609b32100c25d9cf383f082d945

Thanks for pointing this out. I believe this branch is immutable and
so I can rebase over f720efda and send my pull request after yours is
merged ?

Yes, driver-core-next won't be rebased.