[PATCH v2 09/21] dtoc: Output the device in a separate function