[PATCH v5 10/34] dm: blk: Add a function to return the device type