Skip to content

Commit 638eeda

Browse files
committed
rust/drm: Fix Registration::{new,new_foreign_owned}() docs
Looks like we've actually had a malformed rustdoc reference in the rustdocs for Registration::new_foreign_owned() for a while that, when fixed, still couldn't resolve properly because it refers to a private item. This is probably leftover from when Registration::new() was public, so drop the documentation from that function and fixup the documentation for Registration::new_foreign_owned(). Signed-off-by: Lyude Paul <lyude@redhat.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Fixes: 0600032 ("rust: drm: add DRM driver registration") Cc: <stable@vger.kernel.org> # v6.16+ Link: https://patch.msgid.link/20260122221037.3462081-1-lyude@redhat.com
1 parent 6ea52b6 commit 638eeda

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

rust/kernel/drm/driver.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,16 @@ pub trait Driver {
121121
pub struct Registration<T: Driver>(ARef<drm::Device<T>>);
122122

123123
impl<T: Driver> Registration<T> {
124-
/// Creates a new [`Registration`] and registers it.
125124
fn new(drm: &drm::Device<T>, flags: usize) -> Result<Self> {
126125
// SAFETY: `drm.as_raw()` is valid by the invariants of `drm::Device`.
127126
to_result(unsafe { bindings::drm_dev_register(drm.as_raw(), flags) })?;
128127

129128
Ok(Self(drm.into()))
130129
}
131130

132-
/// Same as [`Registration::new`}, but transfers ownership of the [`Registration`] to
133-
/// [`devres::register`].
131+
/// Registers a new [`Device`](drm::Device) with userspace.
132+
///
133+
/// Ownership of the [`Registration`] object is passed to [`devres::register`].
134134
pub fn new_foreign_owned(
135135
drm: &drm::Device<T>,
136136
dev: &device::Device<device::Bound>,

0 commit comments

Comments
 (0)