Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/i2c - Print device ID in 16bits instead of 8bits in ...



details:   https://anonhg.NetBSD.org/src/rev/94868740d8af
branches:  trunk
changeset: 816803:94868740d8af
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Jul 26 07:25:51 2016 +0000

description:
- Print device ID in 16bits instead of 8bits in aprint_debug().
- s/STTS2002/STTS2004/ for STTS2004.

diffstat:

 sys/dev/i2c/sdtemp.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (49 lines):

diff -r f2d8f67b805b -r 94868740d8af sys/dev/i2c/sdtemp.c
--- a/sys/dev/i2c/sdtemp.c      Tue Jul 26 05:53:30 2016 +0000
+++ b/sys/dev/i2c/sdtemp.c      Tue Jul 26 07:25:51 2016 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: sdtemp.c,v 1.26 2015/05/20 00:43:28 msaitoh Exp $        */
+/*      $NetBSD: sdtemp.c,v 1.27 2016/07/26 07:25:51 msaitoh Exp $        */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.26 2015/05/20 00:43:28 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.27 2016/07/26 07:25:51 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -123,7 +123,7 @@
     { STTS_MANUFACTURER_ID,  STTS_2002_DEVICE_ID,    STTS_2002_MASK,   2,
        "STmicroelectronics STTS2002" }, 
     { STTS_MANUFACTURER_ID,  STTS_2004_DEVICE_ID,    STTS_2004_MASK,   2,
-       "STmicroelectronics STTS2002" }, 
+       "STmicroelectronics STTS2004" }, 
     { STTS_MANUFACTURER_ID,  STTS_3000_DEVICE_ID,    STTS_3000_MASK,   2,
        "STmicroelectronics STTS3000" }, 
     { CAT_MANUFACTURER_ID,   CAT_34TS02_DEVICE_ID,  CAT_34TS02_MASK, 4,
@@ -176,8 +176,8 @@
 
        i = sdtemp_lookup(mfgid, devid);
        if (sdtemp_dev_table[i].sdtemp_mfg_id == 0) {
-               aprint_debug("sdtemp: No match for mfg 0x%04x dev 0x%02x "
-                   "rev 0x%02x at address 0x%02x\n", mfgid, devid >> 8,
+               aprint_debug("sdtemp: No match for mfg 0x%04x dev 0x%04x "
+                   "rev 0x%02x at address 0x%02x\n", mfgid, devid,
                    devid & 0xff, sc.sc_address);
                return 0;
        }
@@ -213,8 +213,8 @@
 
        if (sdtemp_dev_table[i].sdtemp_mfg_id == 0)
                aprint_debug_dev(self,
-                   "mfg 0x%04x dev 0x%02x rev 0x%02x at addr 0x%02x\n",
-                   mfgid, devid >> 8, devid & 0xff, ia->ia_addr);
+                   "mfg 0x%04x dev 0x%04x rev 0x%02x at addr 0x%02x\n",
+                   mfgid, devid, devid & 0xff, ia->ia_addr);
 
        /*
         * Alarm capability is required;  if not present, this is likely



Home | Main Index | Thread Index | Old Index