提交 dcce6dc4 编写于 作者: B Bjorn Helgaas

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: NBjorn Helgaas <bhelgaas@google.com>
上级 47087700
...@@ -45,6 +45,11 @@ static inline void pci_add_flags(int flags) ...@@ -45,6 +45,11 @@ static inline void pci_add_flags(int flags)
pci_flags |= flags; pci_flags |= flags;
} }
static inline void pci_clear_flags(int flags)
{
pci_flags &= ~flags;
}
static inline int pci_has_flag(int flag) static inline int pci_has_flag(int flag)
{ {
return pci_flags & flag; return pci_flags & flag;
...@@ -52,6 +57,7 @@ static inline int pci_has_flag(int flag) ...@@ -52,6 +57,7 @@ static inline int pci_has_flag(int flag)
#else #else
static inline void pci_set_flags(int flags) { } static inline void pci_set_flags(int flags) { }
static inline void pci_add_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) static inline int pci_has_flag(int flag)
{ {
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册