rust: drm: remove unneeded handling for config DRM_LEGACY
Subsystems (4)
PATCH 1/1 rust: drm: remove unneeded handling for config DRM_LEGACY
From: Lukas Bulwahn <[email protected]>
Since commit 94f8f319cbcb ("drm: Remove Kconfig option for legacy support (CONFIG_DRM_LEGACY)"), the special handling in the rust drm code for the config DRM_LEGACY is not needed.
Remove the drm_legacy_fields macro and simply use bindings::drm_driver unconditionally.
Signed-off-by Lukas Bulwahn <[email protected]>
--- rust/kernel/drm/device.rs | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-)
rust/kernel/drm/device.rs +1 -32
@@ -16,37 +16,6 @@ };use core::{alloc::Layout , mem, ops::Deref , ptr, ptr::NonNull }; -#[cfg( CONFIG_DRM_LEGACY )] -macro_rules! drm_legacy_fields { - ( $($field:ident: $val:expr),* $(,)? ) => { - bindings::drm_driver { - $( $field: $val ),*, - firstopen:None , - preclose:None , - dma_ioctl:None , - dma_quiescent:None , - context_dtor:None , - irq_handler:None , - irq_preinstall:None , - irq_postinstall:None , - irq_uninstall:None , - get_vblank_counter:None , - enable_vblank:None , - disable_vblank:None , - dev_priv_size:0 , - } - } -} - -#[cfg(not( CONFIG_DRM_LEGACY ))] -macro_rules! drm_legacy_fields { - ( $($field:ident: $val:expr),* $(,)? ) => { - bindings::drm_driver { - $( $field: $val ),* - } - } -} -/// A typed DRM device with a specific `drm::Driver` implementation. /// /// The device is always reference-counted.
@@ -61,7 +30,7 @@ pub struct Device<T: drm::Driver> { }impl <T : drm::Driver >Device <T > { -const VTABLE : bindings::drm_driver =drm_legacy_fields! { +const VTABLE : bindings::drm_driver = bindings::drm_driver { load:None , open:Some (drm::File ::<T ::File >::open_callback), postclose:Some (drm::File ::<T ::File >::postclose_callback),
Signature · 1 line
2.51.0
Quoted 11 lines · Lukas Bulwahn
From: Lukas Bulwahn <[email protected]>
Since commit
94f8f319cbcb("drm: RemoveKconfigoption for legacy support (CONFIG_DRM_LEGACY)"), the special handling in the rust drm code for the configDRM_LEGACYis not needed.Remove the
drm_legacy_fieldsmacro and simply usebindings::drm_driverunconditionally.Signed-off-by Lukas Bulwahn <[email protected]>
Reviewed-by Alice Ryhl <[email protected]>