driver register and unregister with kernel perform using register_chrdev function and alloc_chrdev_region and unregister with unregister_chrdev_region .
one issue faced:
Instead of whole program execute successfully there is no output and after reboot it gives correct output.