Add register the device of the driver. TODO:improve the code to reduce the warning. PROB:have some bugs with the register of the device