Skip to content

Commit

Permalink
gpio: pl061: fix new clippy error
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
wedsonaf committed Feb 10, 2023
1 parent 3dfc5eb commit 1b8f587
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_pl061_rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<DeviceData>::from(data);
Expand Down

0 comments on commit 1b8f587

Please sign in to comment.