PM: Use spinlock instead of mutex in clock management functions