By the way, I suspect this bit: void driver_detach(struct device_driver * drv) { driver_for_each_device(drv, NULL, NULL, __remove_driver); } because removing the current device causes other devices to be removed further along in the list, and I haven't seen anything to cater for that yet... Ciao, Duncan.