Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dcce6dc4 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

PCI: add pci_clear_flags()



Add a pci_clear_flags() for cases when we statically initialize
pci_flags, then decide to clear things out later.

Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 47087700
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -45,6 +45,11 @@ static inline void pci_add_flags(int flags)
	pci_flags |= flags;
}

static inline void pci_clear_flags(int flags)
{
	pci_flags &= ~flags;
}

static inline int pci_has_flag(int flag)
{
	return pci_flags & flag;
@@ -52,6 +57,7 @@ static inline int pci_has_flag(int flag)
#else
static inline void pci_set_flags(int flags) { }
static inline void pci_add_flags(int flags) { }
static inline void pci_clear_flags(int flags) { }
static inline int pci_has_flag(int flag)
{
	return 0;