Skip to content

Commit

Permalink
PCI: add pci_clear_flags()
Browse files Browse the repository at this point in the history
Add a pci_clear_flags() for cases when we statically initialize
pci_flags, then decide to clear things out later.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
Bjorn Helgaas committed Feb 24, 2012
1 parent 4708770 commit dcce6dc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/asm-generic/pci-bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,19 @@ 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;
}
#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;
Expand Down

0 comments on commit dcce6dc

Please sign in to comment.