ACPI: Eliminate the DEVICE_ACPI_HANDLE() macro
Since DEVICE_ACPI_HANDLE() is now literally identical to ACPI_HANDLE(), replace it with the latter everywhere and drop its definition from include/acpi.h. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7b1998116b
commit
3a83f99249
|
@ -544,7 +544,7 @@ static int acpi_dev_pm_get_state(struct device *dev, struct acpi_device *adev,
|
||||||
*/
|
*/
|
||||||
int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p, int d_max_in)
|
int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p, int d_max_in)
|
||||||
{
|
{
|
||||||
acpi_handle handle = DEVICE_ACPI_HANDLE(dev);
|
acpi_handle handle = ACPI_HANDLE(dev);
|
||||||
struct acpi_device *adev;
|
struct acpi_device *adev;
|
||||||
int ret, d_min, d_max;
|
int ret, d_min, d_max;
|
||||||
|
|
||||||
|
@ -652,7 +652,7 @@ int acpi_pm_device_run_wake(struct device *phys_dev, bool enable)
|
||||||
if (!device_run_wake(phys_dev))
|
if (!device_run_wake(phys_dev))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
handle = DEVICE_ACPI_HANDLE(phys_dev);
|
handle = ACPI_HANDLE(phys_dev);
|
||||||
if (!handle || acpi_bus_get_device(handle, &adev)) {
|
if (!handle || acpi_bus_get_device(handle, &adev)) {
|
||||||
dev_dbg(phys_dev, "ACPI handle without context in %s!\n",
|
dev_dbg(phys_dev, "ACPI handle without context in %s!\n",
|
||||||
__func__);
|
__func__);
|
||||||
|
@ -696,7 +696,7 @@ int acpi_pm_device_sleep_wake(struct device *dev, bool enable)
|
||||||
if (!device_can_wakeup(dev))
|
if (!device_can_wakeup(dev))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
handle = DEVICE_ACPI_HANDLE(dev);
|
handle = ACPI_HANDLE(dev);
|
||||||
if (!handle || acpi_bus_get_device(handle, &adev)) {
|
if (!handle || acpi_bus_get_device(handle, &adev)) {
|
||||||
dev_dbg(dev, "ACPI handle without context in %s!\n", __func__);
|
dev_dbg(dev, "ACPI handle without context in %s!\n", __func__);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
@ -718,7 +718,7 @@ int acpi_pm_device_sleep_wake(struct device *dev, bool enable)
|
||||||
*/
|
*/
|
||||||
struct acpi_device *acpi_dev_pm_get_node(struct device *dev)
|
struct acpi_device *acpi_dev_pm_get_node(struct device *dev)
|
||||||
{
|
{
|
||||||
acpi_handle handle = DEVICE_ACPI_HANDLE(dev);
|
acpi_handle handle = ACPI_HANDLE(dev);
|
||||||
struct acpi_device *adev;
|
struct acpi_device *adev;
|
||||||
|
|
||||||
return handle && !acpi_bus_get_device(handle, &adev) ? adev : NULL;
|
return handle && !acpi_bus_get_device(handle, &adev) ? adev : NULL;
|
||||||
|
|
|
@ -196,7 +196,7 @@ static bool intel_dsm_pci_probe(struct pci_dev *pdev)
|
||||||
acpi_handle dhandle;
|
acpi_handle dhandle;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
dhandle = DEVICE_ACPI_HANDLE(&pdev->dev);
|
dhandle = ACPI_HANDLE(&pdev->dev);
|
||||||
if (!dhandle)
|
if (!dhandle)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,7 @@ static void intel_didl_outputs(struct drm_device *dev)
|
||||||
u32 temp;
|
u32 temp;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
handle = DEVICE_ACPI_HANDLE(&dev->pdev->dev);
|
handle = ACPI_HANDLE(&dev->pdev->dev);
|
||||||
if (!handle || acpi_bus_get_device(handle, &acpi_dev))
|
if (!handle || acpi_bus_get_device(handle, &acpi_dev))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ mxm_shadow_dsm(struct nouveau_mxm *mxm, u8 version)
|
||||||
acpi_handle handle;
|
acpi_handle handle;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
handle = DEVICE_ACPI_HANDLE(&device->pdev->dev);
|
handle = ACPI_HANDLE(&device->pdev->dev);
|
||||||
if (!handle)
|
if (!handle)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -256,7 +256,7 @@ static int nouveau_dsm_pci_probe(struct pci_dev *pdev)
|
||||||
acpi_handle dhandle;
|
acpi_handle dhandle;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
dhandle = DEVICE_ACPI_HANDLE(&pdev->dev);
|
dhandle = ACPI_HANDLE(&pdev->dev);
|
||||||
if (!dhandle)
|
if (!dhandle)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -404,7 +404,7 @@ bool nouveau_acpi_rom_supported(struct pci_dev *pdev)
|
||||||
if (!nouveau_dsm_priv.dsm_detected && !nouveau_dsm_priv.optimus_detected)
|
if (!nouveau_dsm_priv.dsm_detected && !nouveau_dsm_priv.optimus_detected)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
dhandle = DEVICE_ACPI_HANDLE(&pdev->dev);
|
dhandle = ACPI_HANDLE(&pdev->dev);
|
||||||
if (!dhandle)
|
if (!dhandle)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -438,7 +438,7 @@ nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
handle = DEVICE_ACPI_HANDLE(&dev->pdev->dev);
|
handle = ACPI_HANDLE(&dev->pdev->dev);
|
||||||
if (!handle)
|
if (!handle)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
|
@ -369,7 +369,7 @@ int radeon_atif_handler(struct radeon_device *rdev,
|
||||||
return NOTIFY_DONE;
|
return NOTIFY_DONE;
|
||||||
|
|
||||||
/* Check pending SBIOS requests */
|
/* Check pending SBIOS requests */
|
||||||
handle = DEVICE_ACPI_HANDLE(&rdev->pdev->dev);
|
handle = ACPI_HANDLE(&rdev->pdev->dev);
|
||||||
count = radeon_atif_get_sbios_requests(handle, &req);
|
count = radeon_atif_get_sbios_requests(handle, &req);
|
||||||
|
|
||||||
if (count <= 0)
|
if (count <= 0)
|
||||||
|
@ -556,7 +556,7 @@ int radeon_acpi_pcie_notify_device_ready(struct radeon_device *rdev)
|
||||||
struct radeon_atcs *atcs = &rdev->atcs;
|
struct radeon_atcs *atcs = &rdev->atcs;
|
||||||
|
|
||||||
/* Get the device handle */
|
/* Get the device handle */
|
||||||
handle = DEVICE_ACPI_HANDLE(&rdev->pdev->dev);
|
handle = ACPI_HANDLE(&rdev->pdev->dev);
|
||||||
if (!handle)
|
if (!handle)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -596,7 +596,7 @@ int radeon_acpi_pcie_performance_request(struct radeon_device *rdev,
|
||||||
u32 retry = 3;
|
u32 retry = 3;
|
||||||
|
|
||||||
/* Get the device handle */
|
/* Get the device handle */
|
||||||
handle = DEVICE_ACPI_HANDLE(&rdev->pdev->dev);
|
handle = ACPI_HANDLE(&rdev->pdev->dev);
|
||||||
if (!handle)
|
if (!handle)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -699,7 +699,7 @@ int radeon_acpi_init(struct radeon_device *rdev)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Get the device handle */
|
/* Get the device handle */
|
||||||
handle = DEVICE_ACPI_HANDLE(&rdev->pdev->dev);
|
handle = ACPI_HANDLE(&rdev->pdev->dev);
|
||||||
|
|
||||||
/* No need to proceed if we're sure that ATIF is not supported */
|
/* No need to proceed if we're sure that ATIF is not supported */
|
||||||
if (!ASIC_IS_AVIVO(rdev) || !rdev->bios || !handle)
|
if (!ASIC_IS_AVIVO(rdev) || !rdev->bios || !handle)
|
||||||
|
|
|
@ -442,7 +442,7 @@ static bool radeon_atpx_pci_probe_handle(struct pci_dev *pdev)
|
||||||
acpi_handle dhandle, atpx_handle;
|
acpi_handle dhandle, atpx_handle;
|
||||||
acpi_status status;
|
acpi_status status;
|
||||||
|
|
||||||
dhandle = DEVICE_ACPI_HANDLE(&pdev->dev);
|
dhandle = ACPI_HANDLE(&pdev->dev);
|
||||||
if (!dhandle)
|
if (!dhandle)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -488,7 +488,7 @@ static int radeon_atpx_init(void)
|
||||||
*/
|
*/
|
||||||
static int radeon_atpx_get_client_id(struct pci_dev *pdev)
|
static int radeon_atpx_get_client_id(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
if (radeon_atpx_priv.dhandle == DEVICE_ACPI_HANDLE(&pdev->dev))
|
if (radeon_atpx_priv.dhandle == ACPI_HANDLE(&pdev->dev))
|
||||||
return VGA_SWITCHEROO_IGD;
|
return VGA_SWITCHEROO_IGD;
|
||||||
else
|
else
|
||||||
return VGA_SWITCHEROO_DIS;
|
return VGA_SWITCHEROO_DIS;
|
||||||
|
|
|
@ -185,7 +185,7 @@ static bool radeon_atrm_get_bios(struct radeon_device *rdev)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
|
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
|
||||||
dhandle = DEVICE_ACPI_HANDLE(&pdev->dev);
|
dhandle = ACPI_HANDLE(&pdev->dev);
|
||||||
if (!dhandle)
|
if (!dhandle)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ static int ide_get_dev_handle(struct device *dev, acpi_handle *handle,
|
||||||
|
|
||||||
DEBPRINT("ENTER: pci %02x:%02x.%01x\n", bus, devnum, func);
|
DEBPRINT("ENTER: pci %02x:%02x.%01x\n", bus, devnum, func);
|
||||||
|
|
||||||
dev_handle = DEVICE_ACPI_HANDLE(dev);
|
dev_handle = ACPI_HANDLE(dev);
|
||||||
if (!dev_handle) {
|
if (!dev_handle) {
|
||||||
DEBPRINT("no acpi handle for device\n");
|
DEBPRINT("no acpi handle for device\n");
|
||||||
goto err;
|
goto err;
|
||||||
|
|
|
@ -367,7 +367,7 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev, u32 flags)
|
||||||
string = (struct acpi_buffer){ ACPI_ALLOCATE_BUFFER, NULL };
|
string = (struct acpi_buffer){ ACPI_ALLOCATE_BUFFER, NULL };
|
||||||
}
|
}
|
||||||
|
|
||||||
handle = DEVICE_ACPI_HANDLE(&pdev->dev);
|
handle = ACPI_HANDLE(&pdev->dev);
|
||||||
if (!handle) {
|
if (!handle) {
|
||||||
/*
|
/*
|
||||||
* This hotplug controller was not listed in the ACPI name
|
* This hotplug controller was not listed in the ACPI name
|
||||||
|
|
|
@ -54,7 +54,7 @@ int pciehp_acpi_slot_detection_check(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
if (slot_detection_mode != PCIEHP_DETECT_ACPI)
|
if (slot_detection_mode != PCIEHP_DETECT_ACPI)
|
||||||
return 0;
|
return 0;
|
||||||
if (acpi_pci_detect_ejectable(DEVICE_ACPI_HANDLE(&dev->dev)))
|
if (acpi_pci_detect_ejectable(ACPI_HANDLE(&dev->dev)))
|
||||||
return 0;
|
return 0;
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ static int __init dummy_probe(struct pcie_device *dev)
|
||||||
dup_slot_id++;
|
dup_slot_id++;
|
||||||
}
|
}
|
||||||
list_add_tail(&slot->list, &dummy_slots);
|
list_add_tail(&slot->list, &dummy_slots);
|
||||||
handle = DEVICE_ACPI_HANDLE(&pdev->dev);
|
handle = ACPI_HANDLE(&pdev->dev);
|
||||||
if (!acpi_slot_detected && acpi_pci_detect_ejectable(handle))
|
if (!acpi_slot_detected && acpi_pci_detect_ejectable(handle))
|
||||||
acpi_slot_detected = 1;
|
acpi_slot_detected = 1;
|
||||||
return -ENODEV; /* dummy driver always returns error */
|
return -ENODEV; /* dummy driver always returns error */
|
||||||
|
|
|
@ -37,7 +37,7 @@ static int ioapic_probe(struct pci_dev *dev, const struct pci_device_id *ent)
|
||||||
char *type;
|
char *type;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
|
||||||
handle = DEVICE_ACPI_HANDLE(&dev->dev);
|
handle = ACPI_HANDLE(&dev->dev);
|
||||||
if (!handle)
|
if (!handle)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|
|
@ -173,14 +173,14 @@ static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev)
|
||||||
|
|
||||||
static bool acpi_pci_power_manageable(struct pci_dev *dev)
|
static bool acpi_pci_power_manageable(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev);
|
acpi_handle handle = ACPI_HANDLE(&dev->dev);
|
||||||
|
|
||||||
return handle ? acpi_bus_power_manageable(handle) : false;
|
return handle ? acpi_bus_power_manageable(handle) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
|
static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
|
||||||
{
|
{
|
||||||
acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev);
|
acpi_handle handle = ACPI_HANDLE(&dev->dev);
|
||||||
static const u8 state_conv[] = {
|
static const u8 state_conv[] = {
|
||||||
[PCI_D0] = ACPI_STATE_D0,
|
[PCI_D0] = ACPI_STATE_D0,
|
||||||
[PCI_D1] = ACPI_STATE_D1,
|
[PCI_D1] = ACPI_STATE_D1,
|
||||||
|
@ -217,7 +217,7 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
|
||||||
|
|
||||||
static bool acpi_pci_can_wakeup(struct pci_dev *dev)
|
static bool acpi_pci_can_wakeup(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev);
|
acpi_handle handle = ACPI_HANDLE(&dev->dev);
|
||||||
|
|
||||||
return handle ? acpi_bus_can_wakeup(handle) : false;
|
return handle ? acpi_bus_can_wakeup(handle) : false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -263,7 +263,7 @@ device_has_dsm(struct device *dev)
|
||||||
acpi_handle handle;
|
acpi_handle handle;
|
||||||
struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
|
struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
|
||||||
|
|
||||||
handle = DEVICE_ACPI_HANDLE(dev);
|
handle = ACPI_HANDLE(dev);
|
||||||
|
|
||||||
if (!handle)
|
if (!handle)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -295,7 +295,7 @@ acpilabel_show(struct device *dev, struct device_attribute *attr, char *buf)
|
||||||
acpi_handle handle;
|
acpi_handle handle;
|
||||||
int length;
|
int length;
|
||||||
|
|
||||||
handle = DEVICE_ACPI_HANDLE(dev);
|
handle = ACPI_HANDLE(dev);
|
||||||
|
|
||||||
if (!handle)
|
if (!handle)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -316,7 +316,7 @@ acpiindex_show(struct device *dev, struct device_attribute *attr, char *buf)
|
||||||
acpi_handle handle;
|
acpi_handle handle;
|
||||||
int length;
|
int length;
|
||||||
|
|
||||||
handle = DEVICE_ACPI_HANDLE(dev);
|
handle = ACPI_HANDLE(dev);
|
||||||
|
|
||||||
if (!handle)
|
if (!handle)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -519,7 +519,7 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
|
||||||
|
|
||||||
gmux_data->power_state = VGA_SWITCHEROO_ON;
|
gmux_data->power_state = VGA_SWITCHEROO_ON;
|
||||||
|
|
||||||
gmux_data->dhandle = DEVICE_ACPI_HANDLE(&pnp->dev);
|
gmux_data->dhandle = ACPI_HANDLE(&pnp->dev);
|
||||||
if (!gmux_data->dhandle) {
|
if (!gmux_data->dhandle) {
|
||||||
pr_err("Cannot find acpi handle for pnp device %s\n",
|
pr_err("Cannot find acpi handle for pnp device %s\n",
|
||||||
dev_name(&pnp->dev));
|
dev_name(&pnp->dev));
|
||||||
|
|
|
@ -89,7 +89,7 @@ static int pnpacpi_set_resources(struct pnp_dev *dev)
|
||||||
|
|
||||||
pnp_dbg(&dev->dev, "set resources\n");
|
pnp_dbg(&dev->dev, "set resources\n");
|
||||||
|
|
||||||
handle = DEVICE_ACPI_HANDLE(&dev->dev);
|
handle = ACPI_HANDLE(&dev->dev);
|
||||||
if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
|
if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
|
||||||
dev_dbg(&dev->dev, "ACPI device not found in %s!\n", __func__);
|
dev_dbg(&dev->dev, "ACPI device not found in %s!\n", __func__);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
@ -122,7 +122,7 @@ static int pnpacpi_disable_resources(struct pnp_dev *dev)
|
||||||
|
|
||||||
dev_dbg(&dev->dev, "disable resources\n");
|
dev_dbg(&dev->dev, "disable resources\n");
|
||||||
|
|
||||||
handle = DEVICE_ACPI_HANDLE(&dev->dev);
|
handle = ACPI_HANDLE(&dev->dev);
|
||||||
if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
|
if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
|
||||||
dev_dbg(&dev->dev, "ACPI device not found in %s!\n", __func__);
|
dev_dbg(&dev->dev, "ACPI device not found in %s!\n", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -144,7 +144,7 @@ static bool pnpacpi_can_wakeup(struct pnp_dev *dev)
|
||||||
struct acpi_device *acpi_dev;
|
struct acpi_device *acpi_dev;
|
||||||
acpi_handle handle;
|
acpi_handle handle;
|
||||||
|
|
||||||
handle = DEVICE_ACPI_HANDLE(&dev->dev);
|
handle = ACPI_HANDLE(&dev->dev);
|
||||||
if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
|
if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
|
||||||
dev_dbg(&dev->dev, "ACPI device not found in %s!\n", __func__);
|
dev_dbg(&dev->dev, "ACPI device not found in %s!\n", __func__);
|
||||||
return false;
|
return false;
|
||||||
|
@ -159,7 +159,7 @@ static int pnpacpi_suspend(struct pnp_dev *dev, pm_message_t state)
|
||||||
acpi_handle handle;
|
acpi_handle handle;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
handle = DEVICE_ACPI_HANDLE(&dev->dev);
|
handle = ACPI_HANDLE(&dev->dev);
|
||||||
if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
|
if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
|
||||||
dev_dbg(&dev->dev, "ACPI device not found in %s!\n", __func__);
|
dev_dbg(&dev->dev, "ACPI device not found in %s!\n", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -194,7 +194,7 @@ static int pnpacpi_suspend(struct pnp_dev *dev, pm_message_t state)
|
||||||
static int pnpacpi_resume(struct pnp_dev *dev)
|
static int pnpacpi_resume(struct pnp_dev *dev)
|
||||||
{
|
{
|
||||||
struct acpi_device *acpi_dev;
|
struct acpi_device *acpi_dev;
|
||||||
acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev);
|
acpi_handle handle = ACPI_HANDLE(&dev->dev);
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
|
if (!handle || acpi_bus_get_device(handle, &acpi_dev)) {
|
||||||
|
|
|
@ -5501,6 +5501,6 @@ acpi_handle usb_get_hub_port_acpi_handle(struct usb_device *hdev,
|
||||||
if (!hub)
|
if (!hub)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return DEVICE_ACPI_HANDLE(&hub->ports[port1 - 1]->dev);
|
return ACPI_HANDLE(&hub->ports[port1 - 1]->dev);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -173,7 +173,7 @@ static int usb_acpi_find_device(struct device *dev, acpi_handle *handle)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* root hub's parent is the usb hcd. */
|
/* root hub's parent is the usb hcd. */
|
||||||
parent_handle = DEVICE_ACPI_HANDLE(dev->parent);
|
parent_handle = ACPI_HANDLE(dev->parent);
|
||||||
*handle = acpi_get_child(parent_handle, udev->portnum);
|
*handle = acpi_get_child(parent_handle, udev->portnum);
|
||||||
if (!*handle)
|
if (!*handle)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
@ -194,7 +194,7 @@ static int usb_acpi_find_device(struct device *dev, acpi_handle *handle)
|
||||||
|
|
||||||
raw_port_num = usb_hcd_find_raw_port_number(hcd,
|
raw_port_num = usb_hcd_find_raw_port_number(hcd,
|
||||||
port_num);
|
port_num);
|
||||||
*handle = acpi_get_child(DEVICE_ACPI_HANDLE(&udev->dev),
|
*handle = acpi_get_child(ACPI_HANDLE(&udev->dev),
|
||||||
raw_port_num);
|
raw_port_num);
|
||||||
if (!*handle)
|
if (!*handle)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
|
@ -58,12 +58,12 @@ static int xen_add_device(struct device *dev)
|
||||||
add.flags = XEN_PCI_DEV_EXTFN;
|
add.flags = XEN_PCI_DEV_EXTFN;
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI
|
#ifdef CONFIG_ACPI
|
||||||
handle = DEVICE_ACPI_HANDLE(&pci_dev->dev);
|
handle = ACPI_HANDLE(&pci_dev->dev);
|
||||||
if (!handle && pci_dev->bus->bridge)
|
if (!handle && pci_dev->bus->bridge)
|
||||||
handle = DEVICE_ACPI_HANDLE(pci_dev->bus->bridge);
|
handle = ACPI_HANDLE(pci_dev->bus->bridge);
|
||||||
#ifdef CONFIG_PCI_IOV
|
#ifdef CONFIG_PCI_IOV
|
||||||
if (!handle && pci_dev->is_virtfn)
|
if (!handle && pci_dev->is_virtfn)
|
||||||
handle = DEVICE_ACPI_HANDLE(physfn->bus->bridge);
|
handle = ACPI_HANDLE(physfn->bus->bridge);
|
||||||
#endif
|
#endif
|
||||||
if (handle) {
|
if (handle) {
|
||||||
acpi_status status;
|
acpi_status status;
|
||||||
|
|
|
@ -482,8 +482,6 @@ static inline bool acpi_driver_match_device(struct device *dev,
|
||||||
|
|
||||||
#endif /* !CONFIG_ACPI */
|
#endif /* !CONFIG_ACPI */
|
||||||
|
|
||||||
#define DEVICE_ACPI_HANDLE(dev) ACPI_HANDLE(dev)
|
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI
|
#ifdef CONFIG_ACPI
|
||||||
void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state,
|
void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state,
|
||||||
u32 pm1a_ctrl, u32 pm1b_ctrl));
|
u32 pm1a_ctrl, u32 pm1b_ctrl));
|
||||||
|
|
|
@ -27,7 +27,7 @@ static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
|
||||||
while (!pci_is_root_bus(pbus))
|
while (!pci_is_root_bus(pbus))
|
||||||
pbus = pbus->parent;
|
pbus = pbus->parent;
|
||||||
|
|
||||||
return DEVICE_ACPI_HANDLE(pbus->bridge);
|
return ACPI_HANDLE(pbus->bridge);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
|
static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
|
||||||
|
@ -39,7 +39,7 @@ static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
|
||||||
else
|
else
|
||||||
dev = &pbus->self->dev;
|
dev = &pbus->self->dev;
|
||||||
|
|
||||||
return DEVICE_ACPI_HANDLE(dev);
|
return ACPI_HANDLE(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void acpi_pci_add_bus(struct pci_bus *bus);
|
void acpi_pci_add_bus(struct pci_bus *bus);
|
||||||
|
|
Loading…
Reference in New Issue