macro_rules! define_of_id_table {
    ($data_type:ty, $($t:tt)*) => { ... };
}
Expand description

Defines a const open firmware device id table that also carries per-entry data/context/info.

The name of the const is OF_DEVICE_ID_TABLE, which is what buses are expected to name their open firmware tables.

Examples

use kernel::of;

define_of_id_table! {u32, [
    (of::DeviceId::Compatible(b"test-device1,test-device2"), Some(0xff)),
    (of::DeviceId::Compatible(b"test-device3"), None),
]};