Skip to content

Commit c109491

Browse files
gmarullcarlescufi
authored andcommitted
device: restore init_res bit field
After b5f3cf8 some platforms (qemu_riscv32_xip) are not able to boot. Re-introduce the bit field for init_res, using `unsigned int` (valids are signed/unsigned int, and bool). Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 2230857 commit c109491

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/zephyr/device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,9 @@ struct device_state {
354354
*
355355
* Device initialization functions return a negative errno code if they
356356
* fail. In Zephyr, errno values do not exceed 255, so we can store the
357-
* positive result value in a uint8_t type.
357+
* positive result value using 8 bits.
358358
*/
359-
uint8_t init_res;
359+
unsigned int init_res : 8;
360360

361361
/** Indicates the device initialization function has been
362362
* invoked.

0 commit comments

Comments
 (0)