Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jun 2010 20:54:53 +0000 (UTC)
From:      Rui Paulo <rpaulo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r209015 - stable/8/sys/dev/ath/ath_hal
Message-ID:  <201006102054.o5AKsrsJ062948@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rpaulo
Date: Thu Jun 10 20:54:53 2010
New Revision: 209015
URL: http://svn.freebsd.org/changeset/base/209015

Log:
  MFC r208642:
   Don't shadow the global variable 'version'.
  
  Submitted by:	Arnaud Lacombe <alc@NetBSD.org>
  Approved by:	re (kensmith)

Modified:
  stable/8/sys/dev/ath/ath_hal/ah_eeprom_v1.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/dev/ath/ath_hal/ah_eeprom_v1.c
==============================================================================
--- stable/8/sys/dev/ath/ath_hal/ah_eeprom_v1.c	Thu Jun 10 20:51:13 2010	(r209014)
+++ stable/8/sys/dev/ath/ath_hal/ah_eeprom_v1.c	Thu Jun 10 20:54:53 2010	(r209015)
@@ -112,7 +112,7 @@ ath_hal_v1EepromAttach(struct ath_hal *a
 {
 	HAL_EEPROM_v1 *ee = AH_PRIVATE(ah)->ah_eeprom;
 	uint16_t athvals[AR_EEPROM_ATHEROS_MAX];	/* XXX off stack */
-	uint16_t protect, version, eeval;
+	uint16_t protect, eeprom_version, eeval;
 	uint32_t sum;
 	int i, loc;
 
@@ -138,18 +138,18 @@ ath_hal_v1EepromAttach(struct ath_hal *a
 	HALDEBUG(ah, HAL_DEBUG_ATTACH, "EEPROM protect 0x%x\n", protect);
 	/* XXX check proper access before continuing */
 
-	if (!ath_hal_eepromRead(ah, AR_EEPROM_VERSION, &version)) {
+	if (!ath_hal_eepromRead(ah, AR_EEPROM_VERSION, &eeprom_version)) {
 		HALDEBUG(ah, HAL_DEBUG_ANY,
 		    "%s: unable to read EEPROM version\n", __func__);
 		return HAL_EEREAD;
 	}
-	if (((version>>12) & 0xf) != 1) {
+	if (((eeprom_version>>12) & 0xf) != 1) {
 		/*
 		 * This code only groks the version 1 EEPROM layout.
 		 */
 		HALDEBUG(ah, HAL_DEBUG_ANY,
 		    "%s: unsupported EEPROM version 0x%x found\n",
-		    __func__, version);
+		    __func__, eeprom_version);
 		return HAL_EEVERSION;
 	}
 
@@ -183,7 +183,7 @@ ath_hal_v1EepromAttach(struct ath_hal *a
 		return HAL_ENOMEM;
 	}
 
-	ee->ee_version		= version;
+	ee->ee_version		= eeprom_version;
 	ee->ee_protect		= protect;
 	ee->ee_antenna		= athvals[2];
 	ee->ee_biasCurrents	= athvals[3];
@@ -243,7 +243,7 @@ ath_hal_v1EepromAttach(struct ath_hal *a
 	}
 
 	AH_PRIVATE(ah)->ah_eeprom = ee;
-	AH_PRIVATE(ah)->ah_eeversion = version;
+	AH_PRIVATE(ah)->ah_eeversion = eeprom_version;
 	AH_PRIVATE(ah)->ah_eepromDetach = v1EepromDetach;
 	AH_PRIVATE(ah)->ah_eepromGet = v1EepromGet;
 	AH_PRIVATE(ah)->ah_eepromSet = v1EepromSet;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006102054.o5AKsrsJ062948>