Sun Mar 28 20:02:29 2021 UTC ()
"iic" only has a single interface attribute, so no need to be explicit.


(thorpej)
diff -r1.77.2.4 -r1.77.2.5 src/sys/dev/i2c/i2c.c

cvs diff -r1.77.2.4 -r1.77.2.5 src/sys/dev/i2c/i2c.c (expand / switch to unified diff)

--- src/sys/dev/i2c/i2c.c 2021/03/22 16:23:44 1.77.2.4
+++ src/sys/dev/i2c/i2c.c 2021/03/28 20:02:29 1.77.2.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: i2c.c,v 1.77.2.4 2021/03/22 16:23:44 thorpej Exp $ */ 1/* $NetBSD: i2c.c,v 1.77.2.5 2021/03/28 20:02:29 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Wasabi Systems, Inc. 4 * Copyright (c) 2003 Wasabi Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Jason R. Thorpe for Wasabi Systems, Inc. 7 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -30,27 +30,27 @@ @@ -30,27 +30,27 @@
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE. 35 * POSSIBILITY OF SUCH DAMAGE.
36 */ 36 */
37 37
38#ifdef _KERNEL_OPT 38#ifdef _KERNEL_OPT
39#include "opt_i2c.h" 39#include "opt_i2c.h"
40#endif 40#endif
41 41
42#include <sys/cdefs.h> 42#include <sys/cdefs.h>
43__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.77.2.4 2021/03/22 16:23:44 thorpej Exp $"); 43__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.77.2.5 2021/03/28 20:02:29 thorpej Exp $");
44 44
45#include <sys/param.h> 45#include <sys/param.h>
46#include <sys/systm.h> 46#include <sys/systm.h>
47#include <sys/device.h> 47#include <sys/device.h>
48#include <sys/event.h> 48#include <sys/event.h>
49#include <sys/conf.h> 49#include <sys/conf.h>
50#include <sys/malloc.h> 50#include <sys/malloc.h>
51#include <sys/kmem.h> 51#include <sys/kmem.h>
52#include <sys/kthread.h> 52#include <sys/kthread.h>
53#include <sys/proc.h> 53#include <sys/proc.h>
54#include <sys/kernel.h> 54#include <sys/kernel.h>
55#include <sys/fcntl.h> 55#include <sys/fcntl.h>
56#include <sys/module.h> 56#include <sys/module.h>
@@ -372,27 +372,26 @@ iic_child_detach(device_t parent, device @@ -372,27 +372,26 @@ iic_child_detach(device_t parent, device
372 372
373 for (i = 0; i <= I2C_MAX_ADDR; i++) 373 for (i = 0; i <= I2C_MAX_ADDR; i++)
374 if (sc->sc_devices[i] == child) { 374 if (sc->sc_devices[i] == child) {
375 sc->sc_devices[i] = NULL; 375 sc->sc_devices[i] = NULL;
376 break; 376 break;
377 } 377 }
378} 378}
379 379
380static int 380static int
381iic_rescan(device_t self, const char *ifattr, const int *locators) 381iic_rescan(device_t self, const char *ifattr, const int *locators)
382{ 382{
383 config_search(self, NULL, 383 config_search(self, NULL,
384 CFARG_SUBMATCH, iic_search, 384 CFARG_SUBMATCH, iic_search,
385 CFARG_IATTR, ifattr, 
386 CFARG_LOCATORS, locators, 385 CFARG_LOCATORS, locators,
387 CFARG_EOL); 386 CFARG_EOL);
388 return 0; 387 return 0;
389} 388}
390 389
391static int 390static int
392iic_match(device_t parent, cfdata_t cf, void *aux) 391iic_match(device_t parent, cfdata_t cf, void *aux)
393{ 392{
394 393
395 return 1; 394 return 1;
396} 395}
397 396
398static void 397static void