Module Name: src Committed By: jmcneill Date: Mon Apr 30 20:26:09 UTC 2018
Modified Files: src/sys/dev/i2c: act8846.c Log Message: act8846_match: filter on ia_addr (device is expected at 0x5a) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/act8846.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/i2c/act8846.c diff -u src/sys/dev/i2c/act8846.c:1.3 src/sys/dev/i2c/act8846.c:1.4 --- src/sys/dev/i2c/act8846.c:1.3 Fri Jan 2 21:55:31 2015 +++ src/sys/dev/i2c/act8846.c Mon Apr 30 20:26:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: act8846.c,v 1.3 2015/01/02 21:55:31 jmcneill Exp $ */ +/* $NetBSD: act8846.c,v 1.4 2018/04/30 20:26:09 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill <jmcne...@invisible.ca> @@ -29,7 +29,7 @@ //#define ACT_DEBUG #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: act8846.c,v 1.3 2015/01/02 21:55:31 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: act8846.c,v 1.4 2018/04/30 20:26:09 jmcneill Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -148,7 +148,12 @@ CFATTACH_DECL_NEW(act8846pm, sizeof(stru static int act8846_match(device_t parent, cfdata_t match, void *aux) { - return 1; + struct i2c_attach_args *ia = aux; + + if (ia->ia_addr == 0x5a) + return 1; + + return 0; } static void