Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c Also check the compatibles table when the size i...
details: https://anonhg.NetBSD.org/src/rev/81dd54f37539
branches: trunk
changeset: 346632:81dd54f37539
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sat Jul 23 18:02:10 2016 +0000
description:
Also check the compatibles table when the size is below zero.
Fixes an aprint_error() on Jetson TK1.
diffstat:
sys/dev/i2c/at24cxx.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 91cbec8c82bc -r 81dd54f37539 sys/dev/i2c/at24cxx.c
--- a/sys/dev/i2c/at24cxx.c Sat Jul 23 18:00:01 2016 +0000
+++ b/sys/dev/i2c/at24cxx.c Sat Jul 23 18:02:10 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: at24cxx.c,v 1.21 2015/12/13 17:15:06 jmcneill Exp $ */
+/* $NetBSD: at24cxx.c,v 1.22 2016/07/23 18:02:10 jakllsch Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.21 2015/12/13 17:15:06 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.22 2016/07/23 18:02:10 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -183,7 +183,7 @@
else
sc->sc_size = ia->ia_size;
- if (sc->sc_size == 0 && ia->ia_ncompat > 0) {
+ if (sc->sc_size <= 0 && ia->ia_ncompat > 0) {
for (n = 0; n < __arraycount(seeprom_sizes); n++) {
if (!strcmp(seeprom_sizes[n].name, ia->ia_compat[n])) {
sc->sc_size = seeprom_sizes[n].size;
Home |
Main Index |
Thread Index |
Old Index