svn commit: r230694 - stable/9/sys/dev/vr
Marius Strobl
marius at FreeBSD.org
Sun Jan 29 00:35:23 UTC 2012
Author: marius
Date: Sun Jan 29 00:35:22 2012
New Revision: 230694
URL: http://svn.freebsd.org/changeset/base/230694
Log:
MFC: r226171
Sprinkle const.
Modified:
stable/9/sys/dev/vr/if_vr.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/amd64/include/xen/ (props changed)
stable/9/sys/boot/ (props changed)
stable/9/sys/boot/i386/efi/ (props changed)
stable/9/sys/boot/ia64/efi/ (props changed)
stable/9/sys/boot/ia64/ski/ (props changed)
stable/9/sys/boot/powerpc/boot1.chrp/ (props changed)
stable/9/sys/boot/powerpc/ofw/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
stable/9/sys/conf/ (props changed)
stable/9/sys/contrib/dev/acpica/ (props changed)
stable/9/sys/contrib/octeon-sdk/ (props changed)
stable/9/sys/contrib/pf/ (props changed)
stable/9/sys/contrib/x86emu/ (props changed)
Modified: stable/9/sys/dev/vr/if_vr.c
==============================================================================
--- stable/9/sys/dev/vr/if_vr.c Sun Jan 29 00:35:22 2012 (r230693)
+++ stable/9/sys/dev/vr/if_vr.c Sun Jan 29 00:35:22 2012 (r230694)
@@ -114,12 +114,12 @@ MODULE_DEPEND(vr, miibus, 1, 1, 1);
#define VR_Q_CSUM (1<<1)
#define VR_Q_CAM (1<<2)
-static struct vr_type {
+static const struct vr_type {
u_int16_t vr_vid;
u_int16_t vr_did;
int vr_quirks;
- char *vr_name;
-} vr_devs[] = {
+ const char *vr_name;
+} const vr_devs[] = {
{ VIA_VENDORID, VIA_DEVICEID_RHINE,
VR_Q_NEEDALIGN,
"VIA VT3043 Rhine I 10/100BaseTX" },
@@ -195,11 +195,11 @@ static void vr_setwol(struct vr_softc *)
static void vr_clrwol(struct vr_softc *);
static int vr_sysctl_stats(SYSCTL_HANDLER_ARGS);
-static struct vr_tx_threshold_table {
+static const struct vr_tx_threshold_table {
int tx_cfg;
int bcr_cfg;
int value;
-} vr_tx_threshold_tables[] = {
+} const vr_tx_threshold_tables[] = {
{ VR_TXTHRESH_64BYTES, VR_BCR1_TXTHRESH64BYTES, 64 },
{ VR_TXTHRESH_128BYTES, VR_BCR1_TXTHRESH128BYTES, 128 },
{ VR_TXTHRESH_256BYTES, VR_BCR1_TXTHRESH256BYTES, 256 },
@@ -553,10 +553,10 @@ vr_reset(const struct vr_softc *sc)
* Probe for a VIA Rhine chip. Check the PCI vendor and device
* IDs against our list and return a match or NULL
*/
-static struct vr_type *
+static const struct vr_type *
vr_match(device_t dev)
{
- struct vr_type *t = vr_devs;
+ const struct vr_type *t = vr_devs;
for (t = vr_devs; t->vr_name != NULL; t++)
if ((pci_get_vendor(dev) == t->vr_vid) &&
@@ -572,7 +572,7 @@ vr_match(device_t dev)
static int
vr_probe(device_t dev)
{
- struct vr_type *t;
+ const struct vr_type *t;
t = vr_match(dev);
if (t != NULL) {
@@ -591,7 +591,7 @@ vr_attach(device_t dev)
{
struct vr_softc *sc;
struct ifnet *ifp;
- struct vr_type *t;
+ const struct vr_type *t;
uint8_t eaddr[ETHER_ADDR_LEN];
int error, rid;
int i, phy, pmc;
More information about the svn-src-stable-9
mailing list