Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/thorpej-cfargs]: src/sys/arch/x86/pci/imcsmb In imcsmb_rescan(), no need...



details:   https://anonhg.NetBSD.org/src/rev/4457e1af62d7
branches:  thorpej-cfargs
changeset: 953881:4457e1af62d7
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Mar 23 01:29:32 2021 +0000

description:
In imcsmb_rescan(), no need to explcitly check that we're being asked
to rescan on the "i2cbus" interface attribute.  The autoconfiguration
machinery will not request a rescan of an interface attribute that a
device does not carry, and imcsmb only carries "i2cbus".

diffstat:

 sys/arch/x86/pci/imcsmb/imcsmb.c |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (37 lines):

diff -r a7457bc93ae5 -r 4457e1af62d7 sys/arch/x86/pci/imcsmb/imcsmb.c
--- a/sys/arch/x86/pci/imcsmb/imcsmb.c  Tue Mar 23 01:25:48 2021 +0000
+++ b/sys/arch/x86/pci/imcsmb/imcsmb.c  Tue Mar 23 01:29:32 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: imcsmb.c,v 1.3 2019/12/22 23:23:31 thorpej Exp $ */
+/* $NetBSD: imcsmb.c,v 1.3.10.1 2021/03/23 01:29:32 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imcsmb.c,v 1.3 2019/12/22 23:23:31 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imcsmb.c,v 1.3.10.1 2021/03/23 01:29:32 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -134,7 +134,7 @@
        if (!pmf_device_register(self, NULL, NULL))
                aprint_error_dev(self, "couldn't establish power handler\n");
 
-       imcsmb_rescan(self, "i2cbus", 0);
+       imcsmb_rescan(self, NULL, NULL);
 }
 
 static int
@@ -143,9 +143,6 @@
        struct imcsmb_softc *sc = device_private(self);
        struct i2cbus_attach_args iba;
 
-       if (!ifattr_match(ifattr, "i2cbus"))
-               return 0;
-
        /* Create the i2cbus child */
        if (sc->sc_smbus != NULL)
                return 0;



Home | Main Index | Thread Index | Old Index