auto_hotplug.c: clean up code