[driver-core PATCH v8 3/9] device core: Consolidate locking and unlocking of parent and device