From: Sascha Wildner Date: Wed, 4 Apr 2012 18:09:14 +0000 (+0200) Subject: kernel/acpi: Remove the redefinition of kthread_create(). X-Git-Tag: v3.4.0rc~1144^2~5 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/197058e7abec46e3d6db85273f18d89b32dae201 kernel/acpi: Remove the redefinition of kthread_create(). It's a relict from an old pile of #ifdefs that defined various incarnations of kthread_create()s for various FreeBSD versions. The #ifdefs have since been removed and this #define is what used to be the __DragonFly__ case. There are only 3 places where kthread_create() is used in ACPI, so remove it because it's just confusing. While here, fix a non-constant format string in one of the kthread_create()s. --- diff --git a/sys/dev/acpica5/Osd/OsdSchedule.c b/sys/dev/acpica5/Osd/OsdSchedule.c index 3a43c79efa..087e68933e 100644 --- a/sys/dev/acpica5/Osd/OsdSchedule.c +++ b/sys/dev/acpica5/Osd/OsdSchedule.c @@ -25,7 +25,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/Osd/OsdSchedule.c,v 1.28 2004/05/06 02:18:58 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/Osd/OsdSchedule.c,v 1.10 2008/06/05 18:06:31 swildner Exp $ */ /* @@ -83,8 +82,7 @@ int acpi_task_thread_init(void) { lwkt_initport_replyonly(&acpi_afree_rport, acpi_autofree_reply); - kthread_create(acpi_task_thread, NULL, &acpi_task_td, - 0, 0, "acpi_task"); + kthread_create(acpi_task_thread, NULL, &acpi_task_td, "acpi_task"); return (0); } diff --git a/sys/dev/acpica5/acpi_thermal.c b/sys/dev/acpica5/acpi_thermal.c index a51b287357..f3319962da 100644 --- a/sys/dev/acpica5/acpi_thermal.c +++ b/sys/dev/acpica5/acpi_thermal.c @@ -317,7 +317,7 @@ acpi_tz_attach(device_t dev) acpi_tz_power_profile, sc, 0); if (acpi_tz_td == NULL) { error = kthread_create(acpi_tz_thread, NULL, &acpi_tz_td, - RFHIGHPID, 0, "acpi_thermal"); + "acpi_thermal"); if (error != 0) { device_printf(sc->tz_dev, "could not create thread - %d", error); goto out; @@ -1200,7 +1200,6 @@ static int acpi_tz_cooling_thread_start(struct acpi_tz_softc *sc) { int error; - char name[16]; ACPI_LOCK(thermal); if (sc->tz_cooling_proc_running) { @@ -1211,10 +1210,9 @@ acpi_tz_cooling_thread_start(struct acpi_tz_softc *sc) ACPI_UNLOCK(thermal); error = 0; if (sc->tz_cooling_proc == NULL) { - ksnprintf(name, sizeof(name), "acpi_cooling%d", - device_get_unit(sc->tz_dev)); error = kthread_create(acpi_tz_cooling_thread, sc, - &sc->tz_cooling_proc, RFHIGHPID, 0, name); + &sc->tz_cooling_proc, + "acpi_cooling%d", device_get_unit(sc->tz_dev)); if (error != 0) { device_printf(sc->tz_dev, "could not create thread - %d", error); ACPI_LOCK(thermal); diff --git a/sys/dev/acpica5/acpivar.h b/sys/dev/acpica5/acpivar.h index 86474979b3..4673118c69 100644 --- a/sys/dev/acpica5/acpivar.h +++ b/sys/dev/acpica5/acpivar.h @@ -346,7 +346,6 @@ void acpi_UserNotify(const char *subsystem, ACPI_HANDLE h, int acpi_bus_alloc_gas(device_t dev, int *type, int *rid, ACPI_GENERIC_ADDRESS *gas, struct resource **res, u_int flags); -# define kthread_create(a, b, c, d, e, f) kthread_create(a, b, c, f) struct acpi_parse_resource_set { void (*set_init)(device_t dev, void *arg, void **context);