Module Name:    src
Committed By:   jruoho
Date:           Wed Jul 28 16:26:57 UTC 2010

Modified Files:
        src/sys/dev/acpi: smbus_acpi.c

Log Message:
Remove the homegrown attempt to match the parent PCI bus. This was only used
for descriptive purposes, and for such purposes the ACPIVERBOSE output is
much better.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/acpi/smbus_acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/smbus_acpi.c
diff -u src/sys/dev/acpi/smbus_acpi.c:1.10 src/sys/dev/acpi/smbus_acpi.c:1.11
--- src/sys/dev/acpi/smbus_acpi.c:1.10	Thu Apr 15 07:02:24 2010
+++ src/sys/dev/acpi/smbus_acpi.c	Wed Jul 28 16:26:56 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: smbus_acpi.c,v 1.10 2010/04/15 07:02:24 jruoho Exp $ */
+/* $NetBSD: smbus_acpi.c,v 1.11 2010/07/28 16:26:56 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smbus_acpi.c,v 1.10 2010/04/15 07:02:24 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smbus_acpi.c,v 1.11 2010/07/28 16:26:56 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -176,12 +176,9 @@
 	struct acpi_attach_args *aa = aux;
 	struct i2cbus_attach_args iba;
 	ACPI_STATUS rv;
-	ACPI_HANDLE native_dev, native_bus;
-	ACPI_DEVICE_INFO *native_dev_info, *native_bus_info;
 	ACPI_BUFFER smi_buf;
 	ACPI_OBJECT *e, *p;
 	struct SMB_INFO *info;
-	int pci_bus, pci_dev, pci_func;
 
 	aprint_naive("\n");
 
@@ -229,44 +226,6 @@
 	}
 	aprint_normal("\n");
 
-	/*
-	 * Retrieve and display native controller info
-	 */
-	rv = AcpiGetParent(sc->sc_devnode->ad_handle, &native_dev);
-
-	native_bus_info = native_dev_info = NULL;
-
-	if (ACPI_SUCCESS(rv))
-		rv = AcpiGetParent(native_dev, &native_bus);
-
-	if (ACPI_SUCCESS(rv))
-		rv = AcpiGetObjectInfo(native_bus, &native_bus_info);
-
-	if (ACPI_SUCCESS(rv) &&
-	    acpi_match_hid(native_bus_info, pcibus_acpi_ids) != 0) {
-
-		rv = AcpiGetObjectInfo(native_dev, &native_dev_info);
-
-		if (ACPI_SUCCESS(rv)) {
-			pci_bus = native_bus_info->Address;
-			pci_dev = ACPI_ADR_PCI_DEV(native_dev_info->Address);
-			pci_func = ACPI_ADR_PCI_FUNC(native_dev_info->Address);
-			aprint_debug_dev(self, "Native i2c host controller"
-			    " is on PCI bus %d dev %d func %d\n",
-			    pci_bus, pci_dev, pci_func);
-			/*
-			 * XXX We really need a mechanism to prevent the
-			 * XXX native controller from attaching
-			 */
-		}
-	}
-
-	if (native_bus_info != NULL)
-		ACPI_FREE(native_bus_info);
-
-	if (native_dev_info != NULL)
-		ACPI_FREE(native_dev_info);
-
 	memset(&iba, 0, sizeof(iba));
 	iba.iba_tag = &sc->sc_i2c_tag;
 	config_found_ia(self, "i2cbus", &iba, iicbus_print);

Reply via email to