static void __exit mbochs_dev_exit(void)
{
	mbochs_dev.bus = NULL;
	mdev_unregister_device(&mbochs_dev);

	device_unregister(&mbochs_dev);
	mdev_unregister_driver(&mbochs_driver);
	cdev_del(&mbochs_cdev);
	unregister_chrdev_region(mbochs_devt, MINORMASK + 1);
	class_destroy(mbochs_class);
	mbochs_class = NULL;
}
static void __exit mbochs_dev_exit(void)
{
	mbochs_dev.bus = NULL;
	mdev_unregister_device(&mbochs_dev);

	device_unregister(&mbochs_dev);
	mdev_unregister_driver(&mbochs_driver);
	cdev_del(&mbochs_cdev);
	unregister_chrdev_region(mbochs_devt, MINORMASK + 1);
	class_destroy(mbochs_class);
	mbochs_class = NULL;
}