Commit 38a991d
committed
examples: Refactor device model with version-based split
The previous implementation of devicemodel_remove used conditional
compilation to switch between void and int return types based on
the kernel version. While functionally correct, the interleaved
`#if/#endif` blocks made the logic harder to follow.
This refactor cleanly separates the two function definitions using
a full `#if/#else` block around the entire function.
No functional behavior is changed.
Close: #313
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>1 parent 0954458 commit 38a991d
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | | - | |
31 | 35 | | |
32 | 36 | | |
33 | | - | |
34 | 37 | | |
35 | | - | |
36 | 38 | | |
37 | | - | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
0 commit comments