From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Helgaas Subject: [PATCH v2 02/12] PCI: add pci_clear_flags() Date: Thu, 23 Feb 2012 12:43:12 -0700 Message-ID: <20120223194312.20708.41825.stgit@bhelgaas.mtv.corp.google.com> References: <20120223194209.20708.54480.stgit@bhelgaas.mtv.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-yw0-f74.google.com ([209.85.213.74]:53451 "EHLO mail-yw0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756195Ab2BWTnO (ORCPT ); Thu, 23 Feb 2012 14:43:14 -0500 Received: by yhgm50 with SMTP id m50so207204yhg.1 for ; Thu, 23 Feb 2012 11:43:13 -0800 (PST) In-Reply-To: <20120223194209.20708.54480.stgit@bhelgaas.mtv.corp.google.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: linux-pci@vger.kernel.org Cc: linux-arch@vger.kernel.org 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 --- include/asm-generic/pci-bridge.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/asm-generic/pci-bridge.h b/include/asm-generic/pci-bridge.h index 4a5aca2..a5b5d5a 100644 --- a/include/asm-generic/pci-bridge.h +++ b/include/asm-generic/pci-bridge.h @@ -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;