FreeBSD Bugzilla – Attachment 204618 Details for
Bug 238138
[PATCH] acpi_dock(4): Notify devd(8) on dock status change
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
acpi_dock(4): Notify devd(8) on dock status change patch
0001-acpi_dock-4-Notify-devd-8-on-dock-status-change.patch (text/plain), 2.19 KB, created by
Muhammad Kaisar Arkhan
on 2019-05-26 12:09:17 UTC
(
hide
)
Description:
acpi_dock(4): Notify devd(8) on dock status change patch
Filename:
MIME Type:
Creator:
Muhammad Kaisar Arkhan
Created:
2019-05-26 12:09:17 UTC
Size:
2.19 KB
patch
obsolete
>From 54fa798f573dfe0ddcf6c8a38c3969d341d230a1 Mon Sep 17 00:00:00 2001 >From: Muhammad Kaisar Arkhan <kaisar@arkhan.io> >Date: Sun, 12 May 2019 14:36:48 +0200 >Subject: [PATCH] acpi_dock(4): Notify devd(8) on dock status change > >If devd(8) is running, it notifies devd(8) when the computer is docked and >undocked. > >Original patch taken from: >https://people.freebsd.org/~iwasaki/acpi/acpi_dock_devd-20080204.diff >--- > sys/dev/acpica/acpi_dock.c | 18 ++++++++++++++++-- > 1 file changed, 16 insertions(+), 2 deletions(-) > >diff --git a/sys/dev/acpica/acpi_dock.c b/sys/dev/acpica/acpi_dock.c >index d27b4bdf3c5f..bc9a867c3882 100644 >--- a/sys/dev/acpica/acpi_dock.c >+++ b/sys/dev/acpica/acpi_dock.c >@@ -257,10 +257,12 @@ static void > acpi_dock_insert(device_t dev) > { > struct acpi_dock_softc *sc; >+ ACPI_HANDLE h; > > ACPI_SERIAL_ASSERT(dock); > > sc = device_get_softc(dev); >+ h = acpi_get_handle(dev); > > if (sc->status == ACPI_DOCK_STATUS_UNDOCKED || > sc->status == ACPI_DOCK_STATUS_UNKNOWN) { >@@ -270,8 +272,14 @@ acpi_dock_insert(device_t dev) > return; > } > >- if (!cold) >+ if (!cold) { > acpi_dock_insert_children(dev); >+ >+ /* Notify devd(8) that we're docked */ >+ if (devctl_process_running()) >+ acpi_UserNotify("Dock", h, 1); >+ } >+ > sc->status = ACPI_DOCK_STATUS_DOCKED; > } > } >@@ -325,10 +333,13 @@ static void > acpi_dock_removal(device_t dev) > { > struct acpi_dock_softc *sc; >+ ACPI_HANDLE h; > > ACPI_SERIAL_ASSERT(dock); > > sc = device_get_softc(dev); >+ h = acpi_get_handle(dev); >+ > if (sc->status == ACPI_DOCK_STATUS_DOCKED || > sc->status == ACPI_DOCK_STATUS_UNKNOWN) { > acpi_dock_eject_children(dev); >@@ -342,6 +353,10 @@ acpi_dock_removal(device_t dev) > return; > } > >+ /* Notify devd(8) that we're undocked */ >+ if (devctl_process_running()) >+ acpi_UserNotify("Dock", h, 0); >+ > sc->status = ACPI_DOCK_STATUS_UNDOCKED; > } > >@@ -534,4 +549,3 @@ static devclass_t acpi_dock_devclass; > > DRIVER_MODULE(acpi_dock, acpi, acpi_dock_driver, acpi_dock_devclass, 0, 0); > MODULE_DEPEND(acpi_dock, acpi, 1, 1, 1); >- >-- >2.21.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 238138
:
204618
|
204619
|
204738