dm: blk: Add a function to find the next block device number

At present this code is inline. Move it into a function to allow it to
be used elsewhere.

Signed-off-by: Simon Glass <sjg@chromium.org>
1 file changed