aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2008-02-10 09:45:28 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-10 15:52:46 -0500
commitb6ce068a1285a24185b01be8a49021827516b3e1 (patch)
treeea1420fefff86f2e2ee4ed83f08ec2dd99a86dc5 /drivers/acpi/osl.c
parenta0ca9909609470ad779b9b9cc68ce96e975afff7 (diff)
Change pci_raw_ops to pci_raw_read/write
We want to allow different implementations of pci_raw_ops for standard and extended config space on x86. Rather than clutter generic code with knowledge of this, we make pci_raw_ops private to x86 and use it to implement the new raw interface -- raw_pci_read() and raw_pci_write(). Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index a14501c98f40..34b3386dedca 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -200,15 +200,6 @@ acpi_status __init acpi_os_initialize(void)
200 200
201acpi_status acpi_os_initialize1(void) 201acpi_status acpi_os_initialize1(void)
202{ 202{
203 /*
204 * Initialize PCI configuration space access, as we'll need to access
205 * it while walking the namespace (bus 0 and root bridges w/ _BBNs).
206 */
207 if (!raw_pci_ops) {
208 printk(KERN_ERR PREFIX
209 "Access to PCI configuration space unavailable\n");
210 return AE_NULL_ENTRY;
211 }
212 kacpid_wq = create_singlethread_workqueue("kacpid"); 203 kacpid_wq = create_singlethread_workqueue("kacpid");
213 kacpi_notify_wq = create_singlethread_workqueue("kacpi_notify"); 204 kacpi_notify_wq = create_singlethread_workqueue("kacpi_notify");
214 BUG_ON(!kacpid_wq); 205 BUG_ON(!kacpid_wq);
@@ -653,11 +644,9 @@ acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
653 return AE_ERROR; 644 return AE_ERROR;
654 } 645 }
655 646
656 BUG_ON(!raw_pci_ops); 647 result = raw_pci_read(pci_id->segment, pci_id->bus,
657 648 PCI_DEVFN(pci_id->device, pci_id->function),
658 result = raw_pci_ops->read(pci_id->segment, pci_id->bus, 649 reg, size, value);
659 PCI_DEVFN(pci_id->device, pci_id->function),
660 reg, size, value);
661 650
662 return (result ? AE_ERROR : AE_OK); 651 return (result ? AE_ERROR : AE_OK);
663} 652}
@@ -682,11 +671,9 @@ acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
682 return AE_ERROR; 671 return AE_ERROR;
683 } 672 }
684 673
685 BUG_ON(!raw_pci_ops); 674 result = raw_pci_write(pci_id->segment, pci_id->bus,
686 675 PCI_DEVFN(pci_id->device, pci_id->function),
687 result = raw_pci_ops->write(pci_id->segment, pci_id->bus, 676 reg, size, value);
688 PCI_DEVFN(pci_id->device, pci_id->function),
689 reg, size, value);
690 677
691 return (result ? AE_ERROR : AE_OK); 678 return (result ? AE_ERROR : AE_OK);
692} 679}