From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: [PATCHv2 13/13] qemu: add pci_get/set_byte Date: Tue, 2 Jun 2009 18:03:19 +0300 Message-ID: <20090602150319.GN6554@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: Paul Brook , Avi Kivity , qemu-devel@nongnu.org, Carsten Otte , kvm@vger.kernel.org, Rusty Russell , vi Return-path: Received: from mx2.redhat.com ([66.187.237.31]:47781 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755285AbZFBPGw (ORCPT ); Tue, 2 Jun 2009 11:06:52 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Add pci_get/set_byte to keep *_word and *_long access functions company. They are unused for now. Signed-off-by: Michael S. Tsirkin --- hw/pci.h | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 4072f16..e1e4fb4 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -263,6 +263,18 @@ PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did, pci_map_irq_fn map_irq, const char *name); static inline void +pci_set_byte(uint8_t *config, uint8_t val) +{ + *config = val; +} + +static inline uint8_t +pci_get_byte(uint8_t *config) +{ + return *config; +} + +static inline void pci_set_word(uint8_t *config, uint16_t val) { cpu_to_le16wu((uint16_t *)config, val); -- 1.6.3.1.56.g79e1.dirty