Commit 0c779db
committed
rust: io: resource: Add owned Resource initialiser
Some C functions like of_reserved_mem_region_to_resource_byname() expect
a pointer to a `struct resource` so provide ::zeroed() as initialiser
and ::as_raw() so other parts in the kernel crate can use functions
which expect such a pointer.
Signed-off-by: Janne Grunau <j@jannau.net>1 parent 339e976 commit 0c779db
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
82 | 94 | | |
83 | 95 | | |
84 | 96 | | |
| |||
0 commit comments