Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm26/ioc Zero-length reads seem to confuse the chi...
details: https://anonhg.NetBSD.org/src/rev/7fefd4608459
branches: trunk
changeset: 499676:7fefd4608459
user: bjh21 <bjh21%NetBSD.org@localhost>
date: Sun Nov 26 18:12:36 2000 +0000
description:
Zero-length reads seem to confuse the chip, so don't do that.
diffstat:
sys/arch/arm26/ioc/rtc.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 8fa4942776fa -r 7fefd4608459 sys/arch/arm26/ioc/rtc.c
--- a/sys/arch/arm26/ioc/rtc.c Sun Nov 26 17:44:02 2000 +0000
+++ b/sys/arch/arm26/ioc/rtc.c Sun Nov 26 18:12:36 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtc.c,v 1.4 2000/07/28 09:54:56 bjh21 Exp $ */
+/* $NetBSD: rtc.c,v 1.5 2000/11/26 18:12:36 bjh21 Exp $ */
/*
* Copyright (c) 2000 Ben Harris
@@ -45,7 +45,7 @@
#include <sys/param.h>
-__RCSID("$NetBSD: rtc.c,v 1.4 2000/07/28 09:54:56 bjh21 Exp $");
+__RCSID("$NetBSD: rtc.c,v 1.5 2000/11/26 18:12:36 bjh21 Exp $");
#include <sys/errno.h>
#include <sys/systm.h>
@@ -99,9 +99,10 @@
void *aux;
{
struct iicbus_attach_args *ib = aux;
+ char buf[1];
if ((ib->ib_addr & PCF8583_MASK) == PCF8583_ADDR &&
- iic_control(parent, ib->ib_addr | IIC_READ, NULL, 0) == 0)
+ iic_control(parent, ib->ib_addr | IIC_READ, buf, 1) == 0)
return 1;
return 0;
}
Home |
Main Index |
Thread Index |
Old Index