Module Name: src Committed By: thorpej Date: Sun Dec 9 16:00:40 UTC 2018
Modified Files: src/sys/dev/ic: com.c Log Message: sparc64 doesn't have a scalar bus_space_handle_t, so cope with this. Also, add a comment about why we're using the dummy / nil space handle in the first place. To generate a diff of this commit: cvs rdiff -u -r1.352 -r1.353 src/sys/dev/ic/com.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/com.c diff -u src/sys/dev/ic/com.c:1.352 src/sys/dev/ic/com.c:1.353 --- src/sys/dev/ic/com.c:1.352 Sat Dec 8 21:14:37 2018 +++ src/sys/dev/ic/com.c Sun Dec 9 16:00:40 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.352 2018/12/08 21:14:37 thorpej Exp $ */ +/* $NetBSD: com.c,v 1.353 2018/12/09 16:00:40 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.352 2018/12/08 21:14:37 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.353 2018/12/09 16:00:40 thorpej Exp $"); #include "opt_com.h" #include "opt_ddb.h" @@ -2508,7 +2508,16 @@ comcnattach(bus_space_tag_t iot, bus_add { struct com_regs regs; - com_init_regs(®s, iot, (bus_space_handle_t)0/*XXX*/, iobase); + /*XXX*/ + bus_space_handle_t dummy_bsh; + memset(&dummy_bsh, 0, sizeof(dummy_bsh)); + + /* + * dummy_bsh required because com_init_regs() wants it. A + * real bus_space_handle will be filled in by cominit() later. + * XXXJRT Detangle this mess eventually, plz. + */ + com_init_regs(®s, iot, dummy_bsh/*XXX*/, iobase); return comcnattach1(®s, rate, frequency, type, cflag); }