convert device component to driver api and fix all errors