Age | Commit message (Collapse) | Author | Files | Lines |
|
Rework the ACPI tiny-power-button driver to install a notify handler or
a fixed event handler for the device it binds to by itself and drop its
notify callback.
This will allow acpi_device_install_notify_handler() and
acpi_device_remove_notify_handler() to be simplified going forward.
Signed-off-by: Rafael J. Wysocki <[email protected]>
|
|
For bus-based driver, device removal is implemented as:
1 device_remove()->
2 bus->remove()->
3 driver->remove()
Driver core needs no inform from callee(bus driver) about the
result of remove callback. In that case, commit fc7a6209d571
("bus: Make remove callback return void") forces bus_type::remove
be void-returned.
Now we have the situation that both 1 & 2 of calling chain are
void-returned, so it does not make much sense for 3(driver->remove)
to return non-void to its caller.
So the basic idea behind this change is making remove() callback of
any bus-based driver to be void-returned.
This change, for itself, is for device drivers based on acpi-bus.
Acked-by: Uwe Kleine-König <[email protected]>
Acked-by: Lee Jones <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Dawei Li <[email protected]>
Reviewed-by: Maximilian Luz <[email protected]> # for drivers/platform/surface/*
Signed-off-by: Rafael J. Wysocki <[email protected]>
|
|
Using module_acpi_driver() to simplify the code.
Signed-off-by: Hanjun Guo <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
|
|
The ACPICA debug code is not used, can be removed.
Signed-off-by: Hanjun Guo <[email protected]>
[ rjw: Subject edit ]
Signed-off-by: Rafael J. Wysocki <[email protected]>
|
|
Virtual machines often use an ACPI power button event to tell the
machine to shut down gracefully.
Provide an extremely lightweight "tiny power button" driver to handle
this event by signaling init directly, rather than running a separate
daemon (such as acpid or systemd-logind) that adds to startup time and
VM image complexity.
The kernel configuration defines the default signal to send init, and
userspace can change this signal via a module parameter.
Suggested-by: "Rafael J. Wysocki" <[email protected]>
Signed-off-by: Josh Triplett <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
|