[PATCH v2 00/16] Cleanup chardev instances with helper function