From a492cb9f4715adf0c4c150d243aa7c6a412e6151 Mon Sep 17 00:00:00 2001 From: phx Date: Sun, 17 Apr 2011 14:58:26 +0000 Subject: [PATCH] Do not print "M41ST84 Real-time Clock/NVRAM", but "M41T8x Real-time Clock" when STRTC_NO_USERRAM is defined. This driver should work for all M41T8x compatible chips (tested on my DSM-G600 with M41T80). --- sys/dev/i2c/m41st84.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/i2c/m41st84.c b/sys/dev/i2c/m41st84.c index 285971698215..a9b06c5f2726 100644 --- a/sys/dev/i2c/m41st84.c +++ b/sys/dev/i2c/m41st84.c @@ -1,4 +1,4 @@ -/* $NetBSD: m41st84.c,v 1.16 2010/10/10 05:17:44 kiyohara Exp $ */ +/* $NetBSD: m41st84.c,v 1.17 2011/04/17 14:58:26 phx Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: m41st84.c,v 1.16 2010/10/10 05:17:44 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: m41st84.c,v 1.17 2011/04/17 14:58:26 phx Exp $"); #include "opt_strtc.h" @@ -105,9 +105,13 @@ strtc_attach(device_t parent, device_t self, void *arg) struct strtc_softc *sc = device_private(self); struct i2c_attach_args *ia = arg; +#ifndef STRTC_NO_USERRAM aprint_naive(": Real-time Clock/NVRAM\n"); aprint_normal(": M41ST84 Real-time Clock/NVRAM\n"); - +#else + aprint_naive(": Real-time Clock\n"); + aprint_normal(": M41T8x Real-time Clock\n"); +#endif sc->sc_tag = ia->ia_tag; sc->sc_address = ia->ia_addr; sc->sc_dev = self;