From nobody Wed Jan 03 20:45:32 2024 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 4T51vJ3qbGz56fvs; Wed, 3 Jan 2024 20:45:32 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T51vJ3NqWz4PLy; Wed, 3 Jan 2024 20:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314732; 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=fYUeceX4e4/3/SyKCT/7TRkwIa97c//G7hx4YMuoF9s=; b=LugaP9clM4W/2t9DpMcI5g8xMHQ8RrOfaZeEIsxUSWd+HyJFywX50FK3mKAst4Ohe/O/s+ +QA9G5r1ynaXa550mA0i4MIvrRRUJyBC0EnzZJL+FSPL+ilXt3c6tdVYjOLbl+dwHMH2p2 PC9Iprwi1tGgKBWiZkpAThSQeBKUAg9xcZ4XQVIvoohHTuHG5EW1GEbz4frhsrskVnyQ6m IyWmyK31bZ4sF7+UgibIa5RrkdoFyHr0FFNxTHiFXSK61e4XlV6FnUKERqd6GTnLMY09/C dvgltj9/GRxQ2M+XXFNzPpELytL2x6m6DhA3hwSKQ5xnJiYNQuVFxWA1HCQCqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704314732; 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=fYUeceX4e4/3/SyKCT/7TRkwIa97c//G7hx4YMuoF9s=; b=wjGxgCC4p3aQB8FTGeUe7pzvUkqmj8cqFbifYrQpkX8KCIYwhDHyO/xYjwtQwXx+mRY/kH d7qCCI+I0OkXZ42Xqz8zP5moyAXBZDplgfl0CnPpdUcG70H7pnSMVZFa8uhLECKJ3dGnHd f/QMfHDW8s2LKXA5iAHQ/4k8cREEebkmeaBhxzKot7vfCYxmeZy9v2i5MpO/ri2msdIoIJ J480pU+laCOmAFVbr1UJBpsvTIU8ibNfS+Tw8pC9d0fZFW3UFjF4yEJGvlBJuPwXoWDqxz NJ8gipfAyPU1yfHVGUpDvDw17o9rELQhphy+m5zV/+Z/ONH+x4Wpo9jl2fqClA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704314732; a=rsa-sha256; cv=none; b=nuQaGubfdnhmSi39H98S3p5teLvwnhrjWab0oO8V9cc8k4J3fLBFOds/Z9MvvsYoQfCTjN IDzWBTFJ7AAAkMVs2RFNDXHkTwBu3TNQQ0lKZN7iiZdAz62kZ/60rbx6JhnTnQ0pdgDJon Zw2AHC1cU418qcYQmZAiU7V9YmeUGKYIfyfc1o8rLCnWu4BzdNV5831Pr2GyvMB2YjQfX4 U/iObp1VD8nBxvRzHRJLMr0D9CRMMVVmGNyNM5osANGsoKDNAgdY0jI39uAAwBSYClwMjE P/TM0NKZ5hy4gTWu8VXFJq/4rLQ8mjs/hjpqBJKJSEaTidiCdcf3OhNU+8Ji9g== 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 4T51vJ2Rxlz10pb; Wed, 3 Jan 2024 20:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403KjWrW037307; Wed, 3 Jan 2024 20:45:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403KjWqM037304; Wed, 3 Jan 2024 20:45:32 GMT (envelope-from git) Date: Wed, 3 Jan 2024 20:45:32 GMT Message-Id: <202401032045.403KjWqM037304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a4c3fdf96d15 - stable/14 - gpiobus: Use bus_generic_rl_* methods 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/14 X-Git-Reftype: branch X-Git-Commit: a4c3fdf96d154377f65571c3a3d5e58048f8ef92 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a4c3fdf96d154377f65571c3a3d5e58048f8ef92 commit a4c3fdf96d154377f65571c3a3d5e58048f8ef92 Author: John Baldwin AuthorDate: 2023-11-22 17:06:22 +0000 Commit: John Baldwin CommitDate: 2024-01-03 20:33:51 +0000 gpiobus: Use bus_generic_rl_* methods Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42715 (cherry picked from commit a19ed3495d5556281ea39995d962b93a637183f0) --- sys/dev/gpio/gpiobus.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c index be2fef549460..65e8d1a775fe 100644 --- a/sys/dev/gpio/gpiobus.c +++ b/sys/dev/gpio/gpiobus.c @@ -755,24 +755,6 @@ gpiobus_hinted_child(device_t bus, const char *dname, int dunit) } } -static int -gpiobus_set_resource(device_t dev, device_t child, int type, int rid, - rman_res_t start, rman_res_t count) -{ - struct gpiobus_ivar *devi; - struct resource_list_entry *rle; - - dprintf("%s: entry (%p, %p, %d, %d, %p, %ld)\n", - __func__, dev, child, type, rid, (void *)(intptr_t)start, count); - devi = GPIOBUS_IVAR(child); - rle = resource_list_add(&devi->rl, type, rid, start, - start + count - 1, count); - if (rle == NULL) - return (ENXIO); - - return (0); -} - static int gpiobus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { @@ -1075,7 +1057,9 @@ static device_method_t gpiobus_methods[] = { DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_config_intr, bus_generic_config_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - DEVMETHOD(bus_set_resource, gpiobus_set_resource), + DEVMETHOD(bus_delete_resource, bus_generic_rl_delete_resource), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_alloc_resource, gpiobus_alloc_resource), DEVMETHOD(bus_release_resource, gpiobus_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),