mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
Merge branches 'acpi-misc' and 'pnp'
Merge miscellaneous ACPI support updates and a PNP update for 6.19-rc1: - Replace `core::mem::zeroed` with `pin_init::zeroed` in the ACPI Rust code (Siyuan Huang) - Update the ACPI code to use the new style of allocating workqueues and new global workqueues (Marco Crivellari) - Fix two spelling mistakes in the ACPI code (Chu Guangqing) - Fix ISAPNP to generate uevents to auto-load modules (René Rebe) * acpi-misc: ACPI: PM: Fix a spelling mistake ACPI: LPSS: Fix a spelling mistake ACPI: thermal: Add WQ_PERCPU to alloc_workqueue() users ACPI: OSL: Add WQ_PERCPU to alloc_workqueue() users ACPI: EC: Add WQ_PERCPU to alloc_workqueue() users ACPI: OSL: replace use of system_wq with system_percpu_wq ACPI: scan: replace use of system_unbound_wq with system_dfl_wq rust: acpi: replace `core::mem::zeroed` with `pin_init::zeroed` * pnp: PNP: Fix ISAPNP to generate uevents to auto-load modules
This commit is contained in:
@@ -39,9 +39,7 @@ impl DeviceId {
|
||||
pub const fn new(id: &'static CStr) -> Self {
|
||||
let src = id.to_bytes_with_nul();
|
||||
build_assert!(src.len() <= Self::ACPI_ID_LEN, "ID exceeds 16 bytes");
|
||||
// Replace with `bindings::acpi_device_id::default()` once stabilized for `const`.
|
||||
// SAFETY: FFI type is valid to be zero-initialized.
|
||||
let mut acpi: bindings::acpi_device_id = unsafe { core::mem::zeroed() };
|
||||
let mut acpi: bindings::acpi_device_id = pin_init::zeroed();
|
||||
let mut i = 0;
|
||||
while i < src.len() {
|
||||
acpi.id[i] = src[i];
|
||||
|
||||
Reference in New Issue
Block a user