dock: introduce .uevent for devices in dock, eg libata

dock's uevent reported itself, not ata. It might be difficult to find an
ata device just according to a dock. This patch introduces docking ops
for each device in a dock. when docking, dock driver can send device
specific uevent. This should help dock station too (not just bay)

Signed-off-by: Shaohua Li <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
Shaohua Li 2008-08-28 10:06:16 +08:00 • committed by Len Brown
commit 1253f7aabf
4 changed files with 68 additions and 13 deletions

View file

@ -115,12 +115,17 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type);
/*--------------------------------------------------------------------------
Dock Station
-------------------------------------------------------------------------- */
struct acpi_dock_ops {
acpi_notify_handler handler;
acpi_notify_handler uevent;
};
#if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE)
extern int is_dock_device(acpi_handle handle);
extern int register_dock_notifier(struct notifier_block *nb);
extern void unregister_dock_notifier(struct notifier_block *nb);
extern int register_hotplug_dock_device(acpi_handle handle,
acpi_notify_handler handler,
struct acpi_dock_ops *ops,
void *context);
extern void unregister_hotplug_dock_device(acpi_handle handle);
#else
@ -136,7 +141,7 @@ static inline void unregister_dock_notifier(struct notifier_block *nb)
{
}
static inline int register_hotplug_dock_device(acpi_handle handle,
acpi_notify_handler handler,
struct acpi_dock_ops *ops,
void *context)
{
return -ENODEV;