From nobody Thu Jan 02 18:28:32 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YPFZn1cjmz5jnV3; Thu, 02 Jan 2025 18:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YPFZm4NQSz4vJb; Thu, 2 Jan 2025 18:28:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735842512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VJwGfHULeGa/5AIp/oZLEf03aHI+aJnCMsjJ69cZwq8=; b=GUBMhkE7k07tHdfCCUyo3DwilI8D+O/iheDc8eaiT0UNbHpdV2xA7CxIoSElGvkHvgrUpn RCUX95rycW1ZJGtc/Hct+JZJECrNcfqeEKItBItq0ICOmy+IF/H/hx6XXNTNnS15mbovq/ u6C8QCXSgdDEnvO1LsPDFv66tuF5itOhazE4Oj3lksKtJqneioCBH061t2IFLaPqcYMuvv 2mfnpVzwJBTlrkw0r/3I3IymHDZ0VAZgdtef9zGP8C/8MdZc7I+LIRQn54ihndg+KEZ9xN Aly905lTfki1s4cp+7UQvZIQbt1CLb9+nXRKx3GzcH+k6WB+rZQHF1DNyTyghw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735842512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VJwGfHULeGa/5AIp/oZLEf03aHI+aJnCMsjJ69cZwq8=; b=OtbTrzra0mUnUvKrbJwuQ5xvbIp5nHOKr08+5g5HRmDLchNPZaklul0cmfyABaBwIv3h3R Rv6Lnaxf/HtmgGxLM47ZimkIFatOJIjzIB/iTl2V9Z28kHS9kWjFi0b6p98UbyGOH4Q/2i AbOpMcSNdiufyOdZxTHh0hu+l2BUC9sXTwh34JSjIzagqYGALnuNCeK84YuZKXQvkg2MAP ZSsFNJ8JEbX+YuJiSHxe47rfKsSiP3QbO9eqTt1LY+yaAbZ5ING80cfMzFwbXUu/PT44xl UxoABhwN0eOK4Hu42ZnInhRyZx1nqw6YdHnjxVAr1UfP+CNVE0ynVAz6scMpnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735842512; a=rsa-sha256; cv=none; b=YJ7cDnJ1ubsv2Kr7ONwKqJ/xvxR3ZC6WY4Nb2jWSohfyRHSMNus7Q6KZyKADVbYQTI18W6 ewTdqbkyXizblkojWWAhQXPxlvnPEgnTkuOdyx+nlM0kdHK727fhnd+nshywxUaJwVTpob QZYFMd28iYmu1NdDI05YO6kQRg2WKen2c7s3ip4+jOa0zLvx13WVj/nEfB5dhe3TaI8kzw lH1RR4Cr8lmyllgRuSeXTypUeQXnvI6+f0DAlG3Mtf7sRxK42Zz7aihsaBQtUmi3/zfSic Q4rw7YrH42H4cDAuPOwCXuka0Ny9uZ+0/iwLnNTMdV0ScWstcvnI5lBoRpPoLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YPFZm3dSyzpPT; Thu, 02 Jan 2025 18:28:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 502ISWv0066733; Thu, 2 Jan 2025 18:28:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 502ISWB3066730; Thu, 2 Jan 2025 18:28:32 GMT (envelope-from git) Date: Thu, 2 Jan 2025 18:28:32 GMT Message-Id: <202501021828.502ISWB3066730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 0ac15e476d87 - main - spibus: Use bus_generic_* directly instead of wrappers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ac15e476d8732bd749768e3fb80e0075f5ad4c0 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0ac15e476d8732bd749768e3fb80e0075f5ad4c0 commit 0ac15e476d8732bd749768e3fb80e0075f5ad4c0 Author: John Baldwin AuthorDate: 2025-01-02 18:25:01 +0000 Commit: John Baldwin CommitDate: 2025-01-02 18:25:01 +0000 spibus: Use bus_generic_* directly instead of wrappers Differential Revision: https://reviews.freebsd.org/D47971 --- sys/dev/spibus/acpi_spibus.c | 2 +- sys/dev/spibus/spibus.c | 29 +++-------------------------- sys/dev/spibus/spibusvar.h | 1 - 3 files changed, 4 insertions(+), 28 deletions(-) diff --git a/sys/dev/spibus/acpi_spibus.c b/sys/dev/spibus/acpi_spibus.c index 9bce45b93dba..749113d81220 100644 --- a/sys/dev/spibus/acpi_spibus.c +++ b/sys/dev/spibus/acpi_spibus.c @@ -394,7 +394,7 @@ acpi_spibus_detach(device_t dev) { acpi_spibus_set_power_children(dev, ACPI_STATE_D3, false); - return (spibus_detach(dev)); + return (bus_generic_detach(dev)); } static int diff --git a/sys/dev/spibus/spibus.c b/sys/dev/spibus/spibus.c index f082b9ec171a..a2e2d884851b 100644 --- a/sys/dev/spibus/spibus.c +++ b/sys/dev/spibus/spibus.c @@ -61,29 +61,6 @@ spibus_attach(device_t dev) return (0); } -/* - * Since this is not a self-enumerating bus, and since we always add - * children in attach, we have to always delete children here. - */ -int -spibus_detach(device_t dev) -{ - return (bus_generic_detach(dev)); -} - -static int -spibus_suspend(device_t dev) -{ - return (bus_generic_suspend(dev)); -} - -static -int -spibus_resume(device_t dev) -{ - return (bus_generic_resume(dev)); -} - static int spibus_print_child(device_t dev, device_t child) { @@ -257,10 +234,10 @@ static device_method_t spibus_methods[] = { /* Device interface */ DEVMETHOD(device_probe, spibus_probe), DEVMETHOD(device_attach, spibus_attach), - DEVMETHOD(device_detach, spibus_detach), + DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, spibus_suspend), - DEVMETHOD(device_resume, spibus_resume), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), diff --git a/sys/dev/spibus/spibusvar.h b/sys/dev/spibus/spibusvar.h index 6a74f9b1053d..25cd380173ad 100644 --- a/sys/dev/spibus/spibusvar.h +++ b/sys/dev/spibus/spibusvar.h @@ -77,7 +77,6 @@ extern driver_t spibus_driver; extern driver_t ofw_spibus_driver; int spibus_attach(device_t); -int spibus_detach(device_t); device_t spibus_add_child_common(device_t, u_int, const char *, int, size_t); void spibus_child_deleted(device_t, device_t); void spibus_probe_nomatch(device_t, device_t);