PS2_FLAG_OPEN
if (atomic_or(&dev->flags, PS2_FLAG_OPEN) & PS2_FLAG_OPEN)
atomic_and(&dev->flags, ~PS2_FLAG_OPEN);
atomic_and(&cookie->dev->flags, ~PS2_FLAG_OPEN);
if ((dev->flags & PS2_FLAG_OPEN) != 0)
if (atomic_or(&dev->flags, PS2_FLAG_OPEN) & PS2_FLAG_OPEN)
atomic_and(&dev->flags, ~PS2_FLAG_OPEN);
atomic_and(&cookie->dev->flags, ~PS2_FLAG_OPEN);
if ((dev->flags & PS2_FLAG_OPEN) != 0)
if (dev->flags & PS2_FLAG_OPEN)
if (atomic_or(&dev->flags, PS2_FLAG_OPEN) & PS2_FLAG_OPEN)
atomic_and(&dev->flags, ~PS2_FLAG_OPEN);
atomic_and(&cookie->dev->flags, ~PS2_FLAG_OPEN);
if (atomic_or(&dev->flags, PS2_FLAG_OPEN) & PS2_FLAG_OPEN)
atomic_and(&dev->flags, ~PS2_FLAG_OPEN);
atomic_and(&cookie->dev->flags, ~PS2_FLAG_OPEN);
if ((dev->flags & PS2_FLAG_OPEN) != 0)