From nobody Fri May 20 00:20:59 2022 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 2FC3B1B404CB; Fri, 20 May 2022 00:21:00 +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 4L46p35nqhz3l6S; Fri, 20 May 2022 00:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653006059; 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=urtCfNrk0v/1V9/SPwtOJ3YxkN7kB0eQ/MfITIpRNhY=; b=nGM9qvNaftkg6aTbfZdD9GuJ/pT8+kLP9K417XyALsPzZMa+AHrbEYmWzBjG5JnV1lL86g L0DB0pXdAOHCS33bR204xqUya1I+y75ogV5SqL/Ke0u0glUjBgucr08r0mgaowwe8nj+uw iUZS8mPTeVFmOHGll/oWd/gHA9mIf8YTqRYS79TdwRqLvrArum7tyy0rrB5NaVT8dKURv5 ugHGiE5XuVl68DMFUJHL8DoHD8cdBppUcewb4FxtdeP6+LlKPvEcyemXS5zQDL8uDzw6YF O35UU92u+4VAK0POFCeh+w24qqFYCHtEUb8K6L/35cvhsUI9DyyhAPA97Zfbxw== 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 8E826279FF; Fri, 20 May 2022 00:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24K0Kx3F071836; Fri, 20 May 2022 00:20:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24K0KxRS071835; Fri, 20 May 2022 00:20:59 GMT (envelope-from git) Date: Fri, 20 May 2022 00:20:59 GMT Message-Id: <202205200020.24K0KxRS071835@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: 7fe4c7b59e03 - stable/13 - acpi_toshiba: Use device_get_softc in attach. 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/13 X-Git-Reftype: branch X-Git-Commit: 7fe4c7b59e030e81dc1227ff649176e99f6de9c9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653006059; 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=urtCfNrk0v/1V9/SPwtOJ3YxkN7kB0eQ/MfITIpRNhY=; b=ouoX/pOu9wWRI9I4K8aZJFj6p1QrfdCwDQIVkY0sNOjLu/fxuJH2kHg6EeV5B5VPxMZe0o kbsvpehoXSfJEkKQAklcerXoyAp9WoNSkSLq/gSdEh/eGaHHdOVNOkbaaq0k49AWaq3s36 WjYT3v0jedRQnFuLwdjaGstNC5lqR8wFTxsSwDy7enHGxGPxnUzEGJtfDd/5N+E3HWDDGi gmPX2crGmV2cWbJ70PybeTSanLQXw8gs5kMPc4yexZaK8mI7g22oqeRn86gMpHt9CzvSNT nmNyTIVTi+pbJs+K10OyffmlFZ8VjQ+xczTmnkT6fDtyu+0BihhJ8HH/19icmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653006059; a=rsa-sha256; cv=none; b=NsLjJs26npwuqQA69x56l1dA4jwC17b8A4k3lv5Zmj3zIEnyzOJmuec7bcJUjfWCjAKdYe rZpARxUTCbKqZp2ORFF6c+S1JCZ+nLCmLPrvz2y6MJMktLF5DKt2Dz5yXoCSmrOVsPTHZ8 CW8JvP7sxVkffM8q8ekyCVeBFkcjreZoyhEOCPv/2LpNQKBQtRZbOWM4kuuottifh9QbL6 awjsV2g7MsVNUITGA+3Ly5lv80t09uVMSFPEiSsXh6xZvm8+cHibaVJPlH4yqxGBSZqoAV EF5j3WvEaCQZuxhUtRK6H+uO8uKpnOkbt5M75PIRgs94y95KF1mDLTrTuxf4cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7fe4c7b59e030e81dc1227ff649176e99f6de9c9 commit 7fe4c7b59e030e81dc1227ff649176e99f6de9c9 Author: John Baldwin AuthorDate: 2022-04-21 17:29:15 +0000 Commit: John Baldwin CommitDate: 2022-05-19 21:33:09 +0000 acpi_toshiba: Use device_get_softc in attach. Rather than a detour via the devclass and hardcoding unit 0. While here, remove a check for sc being NULL. It will never be NULL when attach is called. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D35010 (cherry picked from commit 1ac10fa429370731be57dee76b19896e01764b76) --- sys/dev/acpi_support/acpi_toshiba.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/acpi_support/acpi_toshiba.c b/sys/dev/acpi_support/acpi_toshiba.c index c5233579d560..208cc36c9a59 100644 --- a/sys/dev/acpi_support/acpi_toshiba.c +++ b/sys/dev/acpi_support/acpi_toshiba.c @@ -562,9 +562,7 @@ acpi_toshiba_video_attach(device_t dev) { struct acpi_toshiba_softc *sc; - sc = devclass_get_softc(acpi_toshiba_devclass, 0); - if (sc == NULL) - return (ENXIO); + sc = device_get_softc(dev); sc->video_handle = acpi_get_handle(dev); return (0); }