Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Do not access `sc' directly via the CSR_{READ, WR...
details: https://anonhg.NetBSD.org/src/rev/22729ac8b2c1
branches: trunk
changeset: 349956:22729ac8b2c1
user: leot <leot%NetBSD.org@localhost>
date: Thu Dec 29 19:22:51 2016 +0000
description:
Do not access `sc' directly via the CSR_{READ,WRITE}_[124] macros.
Patch provided by Amol via PR kern/51708.
ok <Riastradh>
diffstat:
sys/dev/pci/if_alcreg.h | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (30 lines):
diff -r 73568a00ed38 -r 22729ac8b2c1 sys/dev/pci/if_alcreg.h
--- a/sys/dev/pci/if_alcreg.h Thu Dec 29 18:44:49 2016 +0000
+++ b/sys/dev/pci/if_alcreg.h Thu Dec 29 19:22:51 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_alcreg.h,v 1.5 2015/11/24 23:30:04 leot Exp $ */
+/* $NetBSD: if_alcreg.h,v 1.6 2016/12/29 19:22:51 leot Exp $ */
/* $OpenBSD: if_alcreg.h,v 1.1 2009/08/08 09:31:13 kevlo Exp $ */
/*-
* Copyright (c) 2009, Pyun YongHyeon <yongari%FreeBSD.org@localhost>
@@ -1488,15 +1488,15 @@
/* Register access macros. */
#define CSR_WRITE_4(_sc, reg, val) \
- bus_space_write_4((sc)->sc_mem_bt, (sc)->sc_mem_bh, (reg), (val))
+ bus_space_write_4((_sc)->sc_mem_bt, (_sc)->sc_mem_bh, (reg), (val))
#define CSR_WRITE_2(_sc, reg, val) \
- bus_space_write_2((sc)->sc_mem_bt, (sc)->sc_mem_bh, (reg), (val))
+ bus_space_write_2((_sc)->sc_mem_bt, (_sc)->sc_mem_bh, (reg), (val))
#define CSR_WRITE_1(_sc, reg, val) \
- bus_space_write_1((sc)->sc_mem_bt, (sc)->sc_mem_bh, (reg), (val))
+ bus_space_write_1((_sc)->sc_mem_bt, (_sc)->sc_mem_bh, (reg), (val))
#define CSR_READ_2(_sc, reg) \
- bus_space_read_2((sc)->sc_mem_bt, (sc)->sc_mem_bh, (reg))
+ bus_space_read_2((_sc)->sc_mem_bt, (_sc)->sc_mem_bh, (reg))
#define CSR_READ_4(_sc, reg) \
- bus_space_read_4((sc)->sc_mem_bt, (sc)->sc_mem_bh, (reg))
+ bus_space_read_4((_sc)->sc_mem_bt, (_sc)->sc_mem_bh, (reg))
#define ALC_RXCHAIN_RESET(_sc) \
do { \
Home |
Main Index |
Thread Index |
Old Index