Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI/ACPI: rename pci_osc_control_set()

- Rename pci_osc_control_set() to acpi_pci_osc_control_set() according
to the other API names in drivers/acpi/pci_root.c.

- Move _OSC related definitions to include/linux/acpi.h because _OSC
related API is implemented in drivers/acpi/pci_root.c now.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Tested-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

authored by

Kenji Kaneshige and committed by
Jesse Barnes
9f5404d8 63f10f0f

+40 -52
+3 -3
drivers/acpi/pci_root.c
··· 306 306 } 307 307 308 308 /** 309 - * pci_osc_control_set - commit requested control to Firmware 309 + * acpi_pci_osc_control_set - commit requested control to Firmware 310 310 * @handle: acpi_handle for the target ACPI object 311 311 * @flags: driver's requested control bits 312 312 * 313 313 * Attempt to take control from Firmware on requested control bits. 314 314 **/ 315 - acpi_status pci_osc_control_set(acpi_handle handle, u32 flags) 315 + acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 flags) 316 316 { 317 317 acpi_status status; 318 318 u32 control_req, result, capbuf[3]; ··· 359 359 mutex_unlock(&osc_lock); 360 360 return status; 361 361 } 362 - EXPORT_SYMBOL(pci_osc_control_set); 362 + EXPORT_SYMBOL(acpi_pci_osc_control_set); 363 363 364 364 static int __devinit acpi_pci_root_add(struct acpi_device *device) 365 365 {
+2 -3
drivers/pci/hotplug/acpi_pcihp.c
··· 30 30 #include <linux/types.h> 31 31 #include <linux/pci.h> 32 32 #include <linux/pci_hotplug.h> 33 + #include <linux/acpi.h> 33 34 #include <linux/pci-acpi.h> 34 - #include <acpi/acpi.h> 35 - #include <acpi/acpi_bus.h> 36 35 37 36 #define MY_NAME "acpi_pcihp" 38 37 ··· 407 408 acpi_get_name(handle, ACPI_FULL_PATHNAME, &string); 408 409 dbg("Trying to get hotplug control for %s\n", 409 410 (char *)string.pointer); 410 - status = pci_osc_control_set(handle, flags); 411 + status = acpi_pci_osc_control_set(handle, flags); 411 412 if (ACPI_SUCCESS(status)) 412 413 goto got_one; 413 414 kfree(string.pointer);
+1 -1
drivers/pci/pcie/aer/aerdrv_acpi.c
··· 38 38 39 39 handle = acpi_find_root_bridge_handle(pdev); 40 40 if (handle) { 41 - status = pci_osc_control_set(handle, 41 + status = acpi_pci_osc_control_set(handle, 42 42 OSC_PCI_EXPRESS_AER_CONTROL | 43 43 OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL); 44 44 }
+34
include/linux/acpi.h
··· 256 256 void __init acpi_old_suspend_ordering(void); 257 257 void __init acpi_s4_no_nvs(void); 258 258 #endif /* CONFIG_PM_SLEEP */ 259 + 260 + #define OSC_QUERY_TYPE 0 261 + #define OSC_SUPPORT_TYPE 1 262 + #define OSC_CONTROL_TYPE 2 263 + #define OSC_SUPPORT_MASKS 0x1f 264 + 265 + /* _OSC DW0 Definition */ 266 + #define OSC_QUERY_ENABLE 1 267 + #define OSC_REQUEST_ERROR 2 268 + #define OSC_INVALID_UUID_ERROR 4 269 + #define OSC_INVALID_REVISION_ERROR 8 270 + #define OSC_CAPABILITIES_MASK_ERROR 16 271 + 272 + /* _OSC DW1 Definition (OS Support Fields) */ 273 + #define OSC_EXT_PCI_CONFIG_SUPPORT 1 274 + #define OSC_ACTIVE_STATE_PWR_SUPPORT 2 275 + #define OSC_CLOCK_PWR_CAPABILITY_SUPPORT 4 276 + #define OSC_PCI_SEGMENT_GROUPS_SUPPORT 8 277 + #define OSC_MSI_SUPPORT 16 278 + 279 + /* _OSC DW1 Definition (OS Control Fields) */ 280 + #define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL 1 281 + #define OSC_SHPC_NATIVE_HP_CONTROL 2 282 + #define OSC_PCI_EXPRESS_PME_CONTROL 4 283 + #define OSC_PCI_EXPRESS_AER_CONTROL 8 284 + #define OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL 16 285 + 286 + #define OSC_CONTROL_MASKS (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | \ 287 + OSC_SHPC_NATIVE_HP_CONTROL | \ 288 + OSC_PCI_EXPRESS_PME_CONTROL | \ 289 + OSC_PCI_EXPRESS_AER_CONTROL | \ 290 + OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL) 291 + 292 + extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 flags); 259 293 #else /* CONFIG_ACPI */ 260 294 261 295 static inline int early_acpi_boot_init(void)
-45
include/linux/pci-acpi.h
··· 10 10 11 11 #include <linux/acpi.h> 12 12 13 - #define OSC_QUERY_TYPE 0 14 - #define OSC_SUPPORT_TYPE 1 15 - #define OSC_CONTROL_TYPE 2 16 - #define OSC_SUPPORT_MASKS 0x1f 17 - 18 - /* 19 - * _OSC DW0 Definition 20 - */ 21 - #define OSC_QUERY_ENABLE 1 22 - #define OSC_REQUEST_ERROR 2 23 - #define OSC_INVALID_UUID_ERROR 4 24 - #define OSC_INVALID_REVISION_ERROR 8 25 - #define OSC_CAPABILITIES_MASK_ERROR 16 26 - 27 - /* 28 - * _OSC DW1 Definition (OS Support Fields) 29 - */ 30 - #define OSC_EXT_PCI_CONFIG_SUPPORT 1 31 - #define OSC_ACTIVE_STATE_PWR_SUPPORT 2 32 - #define OSC_CLOCK_PWR_CAPABILITY_SUPPORT 4 33 - #define OSC_PCI_SEGMENT_GROUPS_SUPPORT 8 34 - #define OSC_MSI_SUPPORT 16 35 - 36 - /* 37 - * _OSC DW1 Definition (OS Control Fields) 38 - */ 39 - #define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL 1 40 - #define OSC_SHPC_NATIVE_HP_CONTROL 2 41 - #define OSC_PCI_EXPRESS_PME_CONTROL 4 42 - #define OSC_PCI_EXPRESS_AER_CONTROL 8 43 - #define OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL 16 44 - 45 - #define OSC_CONTROL_MASKS (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | \ 46 - OSC_SHPC_NATIVE_HP_CONTROL | \ 47 - OSC_PCI_EXPRESS_PME_CONTROL | \ 48 - OSC_PCI_EXPRESS_AER_CONTROL | \ 49 - OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL) 50 - 51 13 #ifdef CONFIG_ACPI 52 - extern acpi_status pci_osc_control_set(acpi_handle handle, u32 flags); 53 14 static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) 54 15 { 55 16 /* Find root host bridge */ ··· 30 69 return acpi_get_pci_rootbridge_handle(seg, busnr); 31 70 } 32 71 #else 33 - #if !defined(AE_ERROR) 34 - typedef u32 acpi_status; 35 - #define AE_ERROR (acpi_status) (0x0001) 36 - #endif 37 - static inline acpi_status pci_osc_control_set(acpi_handle handle, u32 flags) 38 - {return AE_ERROR;} 39 72 static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) 40 73 { return NULL; } 41 74 #endif