Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/i2c seeprom_bootstrap_read(): no need to hard-code I...



details:   https://anonhg.NetBSD.org/src/rev/5d56f13a7e3b
branches:  trunk
changeset: 1005843:5d56f13a7e3b
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Dec 23 02:39:47 2019 +0000

description:
seeprom_bootstrap_read(): no need to hard-code I2C_F_POLL here because
the i2c code will ensure it's there if the system is cold.

diffstat:

 sys/dev/i2c/at24cxx.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (44 lines):

diff -r 1ca029f02d0e -r 5d56f13a7e3b sys/dev/i2c/at24cxx.c
--- a/sys/dev/i2c/at24cxx.c     Mon Dec 23 02:25:28 2019 +0000
+++ b/sys/dev/i2c/at24cxx.c     Mon Dec 23 02:39:47 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: at24cxx.c,v 1.33 2019/11/29 04:59:15 hkenken Exp $     */
+/*     $NetBSD: at24cxx.c,v 1.34 2019/12/23 02:39:47 thorpej Exp $     */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.33 2019/11/29 04:59:15 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.34 2019/12/23 02:39:47 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -416,7 +416,7 @@
        /* We are very forgiving about devsize during bootstrap. */
        cmdlen = (devsize >= 4096) ? 2 : 1;
 
-       if (iic_acquire_bus(tag, I2C_F_POLL) != 0)
+       if (iic_acquire_bus(tag, 0) != 0)
                return (-1);
 
        while (len) {
@@ -432,7 +432,7 @@
                /* Read a single byte. */
                if (iic_exec(tag, I2C_OP_READ_WITH_STOP, addr,
                             cmdbuf, cmdlen, rvp, 1, I2C_F_POLL)) {
-                       iic_release_bus(tag, I2C_F_POLL);
+                       iic_release_bus(tag, 0);
                        return (-1);
                }
 
@@ -441,6 +441,6 @@
                offset++;
        }
 
-       iic_release_bus(tag, I2C_F_POLL);
+       iic_release_bus(tag, 0);
        return (0);
 }



Home | Main Index | Thread Index | Old Index