]> git.baikalelectronics.ru Git - kernel.git/commit
efi/dev-path-parser: Add struct definition for vendor type device path nodes
authorArd Biesheuvel <ardb@kernel.org>
Mon, 10 Feb 2020 08:46:57 +0000 (08:46 +0000)
committerArd Biesheuvel <ardb@kernel.org>
Sun, 23 Feb 2020 20:59:42 +0000 (21:59 +0100)
commit9bab182fcee3e0a6bd83162f28c1095ffa969ea2
treee550735f113e77b2c5d7fc0626e56aecbfc4e40e
parent104e7f1e2c6a7740860f2c75d56ebe8b3e1c321b
efi/dev-path-parser: Add struct definition for vendor type device path nodes

In preparation of adding support for loading the initrd via a special
device path, add the struct definition of a vendor GUIDed device path
node to efi.h.

Since we will be producing these data structures rather than just
consumsing the ones instantiated by the firmware, refactor the various
device path node definitions so we can take the size of each node using
sizeof() rather than having to resort to opaque arithmetic in the static
initializers.

While at it, drop the #if IS_ENABLED() check for the declaration of
efi_get_device_by_path(), which is unnecessary, and constify its first
argument as well.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/apple-properties.c
drivers/firmware/efi/dev-path-parser.c
include/linux/efi.h