// SPDX-License-Identifier: GPL-2.0-or-later use kernel::prelude::*; module! { type: Cider, name: "cider", author: "Snoweuph", description: "An Macbook Pro Touchbar Driver", license: "GPL", } struct Cider { numbers: KVec, } impl kernel::Module for Cider { fn init(_module: &'static ThisModule) -> Result { pr_info!("cider (init)\n"); let mut numbers = KVec::new(); numbers.push(72, GFP_KERNEL)?; numbers.push(108, GFP_KERNEL)?; numbers.push(200, GFP_KERNEL)?; Ok(RustOutOfTree { numbers }) } } impl Drop for Cider { fn drop(&mut self) { pr_info!("My numbers are {:?}\n", self.numbers); pr_info!("cider sample (exit)\n"); } }