From 1b8f58792a947d8b10113e04bb9134161d59f6b4 Mon Sep 17 00:00:00 2001 From: Wedson Almeida Filho Date: Fri, 10 Feb 2023 19:33:28 +0000 Subject: [PATCH] gpio: pl061: fix new clippy error Without this fix, we get the following new clippy error: ``` error: deref which would be done by auto-deref --> drivers/gpio/gpio_pl061_rust.rs:285:75 | 285 | let gen_inner = unsafe { data.as_mut().map_unchecked_mut(|d| &mut (**d).inner) }; | ^^^^^ help: try this: `d` | ``` Signed-off-by: Wedson Almeida Filho --- drivers/gpio/gpio_pl061_rust.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio_pl061_rust.rs b/drivers/gpio/gpio_pl061_rust.rs index 1457d763497eee..5aeb4b0f41823b 100644 --- a/drivers/gpio/gpio_pl061_rust.rs +++ b/drivers/gpio/gpio_pl061_rust.rs @@ -282,7 +282,7 @@ impl amba::Driver for PL061Device { )?; // SAFETY: General part of the data is pinned when `data` is. - let gen_inner = unsafe { data.as_mut().map_unchecked_mut(|d| &mut (**d).inner) }; + let gen_inner = unsafe { data.as_mut().map_unchecked_mut(|d| &mut d.inner) }; kernel::rawspinlock_init!(gen_inner, "PL061Data::inner"); let data = Arc::::from(data);