fixup(adev);
return;
}
+ } else if (cb_type == DOCK_CALL_UEVENT) {
+ void (*uevent)(struct acpi_device *, u32);
+
+ uevent = adev->hp->uevent;
+ if (uevent) {
+ acpi_unlock_hp_context();
+ uevent(adev, event);
+ return;
+ }
} else {
int (*notify)(struct acpi_device *, u32);
- notify = adev->hp->event;
+ notify = adev->hp->notify;
if (notify) {
acpi_unlock_hp_context();
notify(adev, event);
goto err_out;
}
} else {
- int (*event)(struct acpi_device *, u32);
+ int (*notify)(struct acpi_device *, u32);
acpi_lock_hp_context();
- event = adev->hp ? adev->hp->event : NULL;
+ notify = adev->hp ? adev->hp->notify : NULL;
acpi_unlock_hp_context();
/*
* There may be additional notify handlers for device objects
* without the .event() callback, so ignore them here.
*/
- if (event)
- error = event(adev, src);
+ if (notify)
+ error = notify(adev, src);
else
goto out;
}
static LIST_HEAD(bridge_list);
static DEFINE_MUTEX(bridge_mutex);
-static int acpiphp_hotplug_event(struct acpi_device *adev, u32 type);
+static int acpiphp_hotplug_notify(struct acpi_device *adev, u32 type);
static void acpiphp_post_dock_fixup(struct acpi_device *adev);
static void acpiphp_sanitize_bus(struct pci_bus *bus);
static void acpiphp_set_hpp_values(struct pci_bus *bus);
return NULL;
context->refcount = 1;
- acpi_set_hp_context(adev, &context->hp, acpiphp_hotplug_event,
+ acpi_set_hp_context(adev, &context->hp, acpiphp_hotplug_notify, NULL,
acpiphp_post_dock_fixup);
return context;
}
struct acpi_device *adev = func_to_acpi_device(func);
acpi_lock_hp_context();
- adev->hp->event = NULL;
+ adev->hp->notify = NULL;
adev->hp->fixup = NULL;
acpi_unlock_hp_context();
}
put_bridge(bridge);
}
-static int acpiphp_hotplug_event(struct acpi_device *adev, u32 type)
+static int acpiphp_hotplug_notify(struct acpi_device *adev, u32 type)
{
struct acpiphp_context *context;
struct acpi_hotplug_context {
struct acpi_device *self;
- int (*event)(struct acpi_device *, u32);
+ int (*notify)(struct acpi_device *, u32);
+ void (*uevent)(struct acpi_device *, u32);
void (*fixup)(struct acpi_device *);
};
static inline void acpi_set_hp_context(struct acpi_device *adev,
struct acpi_hotplug_context *hp,
- int (*event)(struct acpi_device *, u32),
+ int (*notify)(struct acpi_device *, u32),
+ void (*uevent)(struct acpi_device *, u32),
void (*fixup)(struct acpi_device *))
{
hp->self = adev;
- hp->event = event;
+ hp->notify = notify;
+ hp->uevent = uevent;
hp->fixup = fixup;
adev->hp = hp;
}