Minor cleanup in devices.c