]> git.ipfire.org Git - people/ms/u-boot.git/commit - disk/part_dos.c
dm: part: Convert partition API use to linker lists
authorSimon Glass <sjg@chromium.org>
Mon, 29 Feb 2016 22:25:47 +0000 (15:25 -0700)
committerSimon Glass <sjg@chromium.org>
Mon, 14 Mar 2016 21:34:50 +0000 (15:34 -0600)
commit96e5b03c8ab749b6547f6a3ceb4d4b9f274211aa
treee27fa651bc8f72305ff2e90b61cc9914c5b2b502
parent14142811f4c2d4da28e86ccb2375487f8dff02cb
dm: part: Convert partition API use to linker lists

We can use linker lists instead of explicitly declaring each function.
This makes the code shorter by avoiding switch() statements and lots of
header file declarations.

While this does clean up the code it introduces a few code issues with SPL.
SPL never needs to print partition information since this all happens from
commands. SPL mostly doesn't need to obtain information about a partition
either, except in a few cases. Add these cases so that the code will be
dropped from each partition driver when not needed. This avoids code bloat.

I think this is still a win, since it is not a bad thing to be explicit
about which features are used in SPL. But others may like to weigh in.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
disk/part.c
disk/part_amiga.c
disk/part_dos.c
disk/part_efi.c
disk/part_iso.c
disk/part_mac.c
include/part.h