MFC r310559 and r310583: Implement register and unregister chrdev in the LinuxKPI.
Obtained from: kmacy @ Sponsored by: Mellanox Technologies