Use register_chrdev and unregister_chrdev as before, and everything will work.
Attach a file by drag & drop or click to upload