driver core: Add a guard() definition for the device_lock()