Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 May 2020 11:57:48 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r361368 - stable/12/sys/dev/iicbus
Message-ID:  <202005221157.04MBvm8R027764@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Fri May 22 11:57:48 2020
New Revision: 361368
URL: https://svnweb.freebsd.org/changeset/base/361368

Log:
  MFC r360242: acpi_iicbus: set device description in the probe method
  
  Kernel prints the device announcement before the attach method is
  called, so if the correct description is not set by the probe method,
  then the announcement would have an incorrect one.

Modified:
  stable/12/sys/dev/iicbus/acpi_iicbus.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/iicbus/acpi_iicbus.c
==============================================================================
--- stable/12/sys/dev/iicbus/acpi_iicbus.c	Fri May 22 11:55:54 2020	(r361367)
+++ stable/12/sys/dev/iicbus/acpi_iicbus.c	Fri May 22 11:57:48 2020	(r361368)
@@ -573,6 +573,7 @@ acpi_iicbus_probe(device_t dev)
 	if (handle == NULL)
 		return (ENXIO);
 
+	device_set_desc(dev, "Philips I2C bus (ACPI-hinted)");
 	return (BUS_PROBE_DEFAULT);
 }
 
@@ -581,8 +582,6 @@ acpi_iicbus_attach(device_t dev)
 {
 	struct acpi_iicbus_softc *sc = device_get_softc(dev);
 	int error;
-
-	device_set_desc(dev, "Philips I2C bus (ACPI-hinted)");
 
 	if (ACPI_FAILURE(acpi_iicbus_enumerate_children(dev)))
 		device_printf(dev, "children enumeration failed\n");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005221157.04MBvm8R027764>