mt76x2: apply coverage class on slot time too
[linux/fpc-iii.git] / drivers / staging / rts5208 / general.c
blob79d245877264f34a7dfbee610ea48bb94437643b
1 /* Driver for Realtek PCI-Express card reader
3 * Copyright(c) 2009-2013 Realtek Semiconductor Corp. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2, or (at your option) any
8 * later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, see <http://www.gnu.org/licenses/>.
18 * Author:
19 * Wei WANG (wei_wang@realsil.com.cn)
20 * Micky Ching (micky_ching@realsil.com.cn)
23 #include "general.h"
25 int bit1cnt_long(u32 data)
27 int i, cnt = 0;
29 for (i = 0; i < 32; i++) {
30 if (data & 0x01)
31 cnt++;
32 data >>= 1;
34 return cnt;