* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with this program; If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CARL9170FW_IO_H
uint32_t i = 0, read, tmp;
read = readl(addr);
- while (i++ < 10) {
+ do {
+ tmp = read;
tmp = readl(addr);
- if (tmp == read)
- break;
- else
- read = tmp;
- }
+ i++;
+ } while (tmp != read && i <= 10);
return read;
}