Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c act8846_match: filter on ia_addr (d...
details: https://anonhg.NetBSD.org/src/rev/9f180f062a46
branches: trunk
changeset: 318588:9f180f062a46
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon Apr 30 20:26:09 2018 +0000
description:
act8846_match: filter on ia_addr (device is expected at 0x5a)
diffstat:
sys/dev/i2c/act8846.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r e29b8624fab0 -r 9f180f062a46 sys/dev/i2c/act8846.c
--- a/sys/dev/i2c/act8846.c Mon Apr 30 09:59:09 2018 +0000
+++ b/sys/dev/i2c/act8846.c Mon Apr 30 20:26:09 2018 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
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
Home |
Main Index |
Thread Index |
Old Index