Commit e7d122b5 authored by Neil Munro's avatar Neil Munro Committed by Greg Kroah-Hartman

Staging: RT2860: Cleaned all bar one in chlist.h

I have cleaned all errors and all bar one warning in chlist.h. The
remaining warning is a line over 80 characters warning.  Breaking it
doesnt look all that easy.
Signed-off-by: default avatarNeil Munro <neilmunro@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e3eb7cdd
...@@ -73,35 +73,31 @@ struct rt_ch_freq_map { ...@@ -73,35 +73,31 @@ struct rt_ch_freq_map {
extern struct rt_ch_freq_map CH_HZ_ID_MAP[]; extern struct rt_ch_freq_map CH_HZ_ID_MAP[];
extern int CH_HZ_ID_MAP_NUM; extern int CH_HZ_ID_MAP_NUM;
#define MAP_CHANNEL_ID_TO_KHZ(_ch, _khz) \ #define MAP_CHANNEL_ID_TO_KHZ(_ch, _khz) \
do{ \ do { \
int _chIdx; \ int _chIdx; \
for (_chIdx = 0; _chIdx < CH_HZ_ID_MAP_NUM; _chIdx++)\ for (_chIdx = 0; _chIdx < CH_HZ_ID_MAP_NUM; _chIdx++) {\
{ \ if ((_ch) == CH_HZ_ID_MAP[_chIdx].channel) { \
if ((_ch) == CH_HZ_ID_MAP[_chIdx].channel) \ (_khz) = CH_HZ_ID_MAP[_chIdx].freqKHz * 1000;\
{ \ break; \
(_khz) = CH_HZ_ID_MAP[_chIdx].freqKHz * 1000; \ } \
break; \ } \
} \ if (_chIdx == CH_HZ_ID_MAP_NUM) \
} \ (_khz) = 2412000; \
if (_chIdx == CH_HZ_ID_MAP_NUM) \ } while (0)
(_khz) = 2412000; \
}while(0)
#define MAP_KHZ_TO_CHANNEL_ID(_khz, _ch) \ #define MAP_KHZ_TO_CHANNEL_ID(_khz, _ch) \
do{ \ do { \
int _chIdx; \ int _chIdx; \
for (_chIdx = 0; _chIdx < CH_HZ_ID_MAP_NUM; _chIdx++)\ for (_chIdx = 0; _chIdx < CH_HZ_ID_MAP_NUM; _chIdx++) {\
{ \ if ((_khz) == CH_HZ_ID_MAP[_chIdx].freqKHz) {\
if ((_khz) == CH_HZ_ID_MAP[_chIdx].freqKHz) \ (_ch) = CH_HZ_ID_MAP[_chIdx].channel; \
{ \ break; \
(_ch) = CH_HZ_ID_MAP[_chIdx].channel; \ } \
break; \ } \
} \ if (_chIdx == CH_HZ_ID_MAP_NUM) \
} \ (_ch) = 1; \
if (_chIdx == CH_HZ_ID_MAP_NUM) \ } while (0)
(_ch) = 1; \
}while(0)
void BuildChannelListEx(struct rt_rtmp_adapter *pAd); void BuildChannelListEx(struct rt_rtmp_adapter *pAd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment