summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2013-05-08 16:23:42 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-05-16 13:09:16 -0400
commitb0222afa5bab555c378d2ab82b32078c9e942b3a (patch)
treeca47973e25a219bd451b4a70e2a72c59c22a16cd /drivers/mfd
parentc972c1280387e7015790d251160039ea2077e430 (diff)
mfd: si476x: Do not use binary constants
Gcc < 4.3 doesn't understand binary constanrs (0b*): drivers/mfd/si476x-cmd.c:153:22: error: invalid suffix "b11111" on integer constant drivers/mfd/si476x-cmd.c:775:20: error: invalid suffix "b00001000" on integer constant drivers/mfd/si476x-cmd.c:776:20: error: invalid suffix "b00000100" on integer constant drivers/mfd/si476x-cmd.c:777:21: error: invalid suffix "b00000010" on integer constant drivers/mfd/si476x-cmd.c:778:21: error: invalid suffix "b00000001" on integer constant drivers/mfd/si476x-cmd.c:780:17: error: invalid suffix "b10000000" on integer constant drivers/mfd/si476x-cmd.c:781:22: error: invalid suffix "b00100000" on integer constant ... Hence use hexadecimal constants (0x*) instead. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/si476x-cmd.c122
1 files changed, 61 insertions, 61 deletions
diff --git a/drivers/mfd/si476x-cmd.c b/drivers/mfd/si476x-cmd.c
index de48b4e88450..f12f0163feff 100644
--- a/drivers/mfd/si476x-cmd.c
+++ b/drivers/mfd/si476x-cmd.c
@@ -150,7 +150,7 @@ enum si476x_acf_status_report_bits {
150 SI476X_ACF_SOFTMUTE_INT = (1 << 0), 150 SI476X_ACF_SOFTMUTE_INT = (1 << 0),
151 151
152 SI476X_ACF_SMUTE = (1 << 0), 152 SI476X_ACF_SMUTE = (1 << 0),
153 SI476X_ACF_SMATTN = 0b11111, 153 SI476X_ACF_SMATTN = 0x1f,
154 SI476X_ACF_PILOT = (1 << 7), 154 SI476X_ACF_PILOT = (1 << 7),
155 SI476X_ACF_STBLEND = ~SI476X_ACF_PILOT, 155 SI476X_ACF_STBLEND = ~SI476X_ACF_PILOT,
156}; 156};
@@ -772,16 +772,16 @@ int si476x_core_cmd_am_rsq_status(struct si476x_core *core,
772 if (!report) 772 if (!report)
773 return err; 773 return err;
774 774
775 report->snrhint = 0b00001000 & resp[1]; 775 report->snrhint = 0x08 & resp[1];
776 report->snrlint = 0b00000100 & resp[1]; 776 report->snrlint = 0x04 & resp[1];
777 report->rssihint = 0b00000010 & resp[1]; 777 report->rssihint = 0x02 & resp[1];
778 report->rssilint = 0b00000001 & resp[1]; 778 report->rssilint = 0x01 & resp[1];
779 779
780 report->bltf = 0b10000000 & resp[2]; 780 report->bltf = 0x80 & resp[2];
781 report->snr_ready = 0b00100000 & resp[2]; 781 report->snr_ready = 0x20 & resp[2];
782 report->rssiready = 0b00001000 & resp[2]; 782 report->rssiready = 0x08 & resp[2];
783 report->afcrl = 0b00000010 & resp[2]; 783 report->afcrl = 0x02 & resp[2];
784 report->valid = 0b00000001 & resp[2]; 784 report->valid = 0x01 & resp[2];
785 785
786 report->readfreq = be16_to_cpup((__be16 *)(resp + 3)); 786 report->readfreq = be16_to_cpup((__be16 *)(resp + 3));
787 report->freqoff = resp[5]; 787 report->freqoff = resp[5];
@@ -931,26 +931,26 @@ int si476x_core_cmd_fm_rds_status(struct si476x_core *core,
931 if (err < 0 || report == NULL) 931 if (err < 0 || report == NULL)
932 return err; 932 return err;
933 933
934 report->rdstpptyint = 0b00010000 & resp[1]; 934 report->rdstpptyint = 0x10 & resp[1];
935 report->rdspiint = 0b00001000 & resp[1]; 935 report->rdspiint = 0x08 & resp[1];
936 report->rdssyncint = 0b00000010 & resp[1]; 936 report->rdssyncint = 0x02 & resp[1];
937 report->rdsfifoint = 0b00000001 & resp[1]; 937 report->rdsfifoint = 0x01 & resp[1];
938 938
939 report->tpptyvalid = 0b00010000 & resp[2]; 939 report->tpptyvalid = 0x10 & resp[2];
940 report->pivalid = 0b00001000 & resp[2]; 940 report->pivalid = 0x08 & resp[2];
941 report->rdssync = 0b00000010 & resp[2]; 941 report->rdssync = 0x02 & resp[2];
942 report->rdsfifolost = 0b00000001 & resp[2]; 942 report->rdsfifolost = 0x01 & resp[2];
943 943
944 report->tp = 0b00100000 & resp[3]; 944 report->tp = 0x20 & resp[3];
945 report->pty = 0b00011111 & resp[3]; 945 report->pty = 0x1f & resp[3];
946 946
947 report->pi = be16_to_cpup((__be16 *)(resp + 4)); 947 report->pi = be16_to_cpup((__be16 *)(resp + 4));
948 report->rdsfifoused = resp[6]; 948 report->rdsfifoused = resp[6];
949 949
950 report->ble[V4L2_RDS_BLOCK_A] = 0b11000000 & resp[7]; 950 report->ble[V4L2_RDS_BLOCK_A] = 0xc0 & resp[7];
951 report->ble[V4L2_RDS_BLOCK_B] = 0b00110000 & resp[7]; 951 report->ble[V4L2_RDS_BLOCK_B] = 0x30 & resp[7];
952 report->ble[V4L2_RDS_BLOCK_C] = 0b00001100 & resp[7]; 952 report->ble[V4L2_RDS_BLOCK_C] = 0x0c & resp[7];
953 report->ble[V4L2_RDS_BLOCK_D] = 0b00000011 & resp[7]; 953 report->ble[V4L2_RDS_BLOCK_D] = 0x03 & resp[7];
954 954
955 report->rds[V4L2_RDS_BLOCK_A].block = V4L2_RDS_BLOCK_A; 955 report->rds[V4L2_RDS_BLOCK_A].block = V4L2_RDS_BLOCK_A;
956 report->rds[V4L2_RDS_BLOCK_A].msb = resp[8]; 956 report->rds[V4L2_RDS_BLOCK_A].msb = resp[8];
@@ -1005,7 +1005,7 @@ int si476x_core_cmd_fm_phase_diversity(struct si476x_core *core,
1005{ 1005{
1006 u8 resp[CMD_FM_PHASE_DIVERSITY_NRESP]; 1006 u8 resp[CMD_FM_PHASE_DIVERSITY_NRESP];
1007 const u8 args[CMD_FM_PHASE_DIVERSITY_NARGS] = { 1007 const u8 args[CMD_FM_PHASE_DIVERSITY_NARGS] = {
1008 mode & 0b111, 1008 mode & 0x07,
1009 }; 1009 };
1010 1010
1011 return si476x_core_send_command(core, CMD_FM_PHASE_DIVERSITY, 1011 return si476x_core_send_command(core, CMD_FM_PHASE_DIVERSITY,
@@ -1162,7 +1162,7 @@ static int si476x_core_cmd_am_tune_freq_a20(struct si476x_core *core,
1162 const int am_freq = tuneargs->freq; 1162 const int am_freq = tuneargs->freq;
1163 u8 resp[CMD_AM_TUNE_FREQ_NRESP]; 1163 u8 resp[CMD_AM_TUNE_FREQ_NRESP];
1164 const u8 args[CMD_AM_TUNE_FREQ_NARGS] = { 1164 const u8 args[CMD_AM_TUNE_FREQ_NARGS] = {
1165 (tuneargs->zifsr << 6) | (tuneargs->injside & 0b11), 1165 (tuneargs->zifsr << 6) | (tuneargs->injside & 0x03),
1166 msb(am_freq), 1166 msb(am_freq),
1167 lsb(am_freq), 1167 lsb(am_freq),
1168 }; 1168 };
@@ -1197,18 +1197,18 @@ static int si476x_core_cmd_fm_rsq_status_a10(struct si476x_core *core,
1197 if (err < 0 || report == NULL) 1197 if (err < 0 || report == NULL)
1198 return err; 1198 return err;
1199 1199
1200 report->multhint = 0b10000000 & resp[1]; 1200 report->multhint = 0x80 & resp[1];
1201 report->multlint = 0b01000000 & resp[1]; 1201 report->multlint = 0x40 & resp[1];
1202 report->snrhint = 0b00001000 & resp[1]; 1202 report->snrhint = 0x08 & resp[1];
1203 report->snrlint = 0b00000100 & resp[1]; 1203 report->snrlint = 0x04 & resp[1];
1204 report->rssihint = 0b00000010 & resp[1]; 1204 report->rssihint = 0x02 & resp[1];
1205 report->rssilint = 0b00000001 & resp[1]; 1205 report->rssilint = 0x01 & resp[1];
1206 1206
1207 report->bltf = 0b10000000 & resp[2]; 1207 report->bltf = 0x80 & resp[2];
1208 report->snr_ready = 0b00100000 & resp[2]; 1208 report->snr_ready = 0x20 & resp[2];
1209 report->rssiready = 0b00001000 & resp[2]; 1209 report->rssiready = 0x08 & resp[2];
1210 report->afcrl = 0b00000010 & resp[2]; 1210 report->afcrl = 0x02 & resp[2];
1211 report->valid = 0b00000001 & resp[2]; 1211 report->valid = 0x01 & resp[2];
1212 1212
1213 report->readfreq = be16_to_cpup((__be16 *)(resp + 3)); 1213 report->readfreq = be16_to_cpup((__be16 *)(resp + 3));
1214 report->freqoff = resp[5]; 1214 report->freqoff = resp[5];
@@ -1251,18 +1251,18 @@ static int si476x_core_cmd_fm_rsq_status_a20(struct si476x_core *core,
1251 if (err < 0 || report == NULL) 1251 if (err < 0 || report == NULL)
1252 return err; 1252 return err;
1253 1253
1254 report->multhint = 0b10000000 & resp[1]; 1254 report->multhint = 0x80 & resp[1];
1255 report->multlint = 0b01000000 & resp[1]; 1255 report->multlint = 0x40 & resp[1];
1256 report->snrhint = 0b00001000 & resp[1]; 1256 report->snrhint = 0x08 & resp[1];
1257 report->snrlint = 0b00000100 & resp[1]; 1257 report->snrlint = 0x04 & resp[1];
1258 report->rssihint = 0b00000010 & resp[1]; 1258 report->rssihint = 0x02 & resp[1];
1259 report->rssilint = 0b00000001 & resp[1]; 1259 report->rssilint = 0x01 & resp[1];
1260 1260
1261 report->bltf = 0b10000000 & resp[2]; 1261 report->bltf = 0x80 & resp[2];
1262 report->snr_ready = 0b00100000 & resp[2]; 1262 report->snr_ready = 0x20 & resp[2];
1263 report->rssiready = 0b00001000 & resp[2]; 1263 report->rssiready = 0x08 & resp[2];
1264 report->afcrl = 0b00000010 & resp[2]; 1264 report->afcrl = 0x02 & resp[2];
1265 report->valid = 0b00000001 & resp[2]; 1265 report->valid = 0x01 & resp[2];
1266 1266
1267 report->readfreq = be16_to_cpup((__be16 *)(resp + 3)); 1267 report->readfreq = be16_to_cpup((__be16 *)(resp + 3));
1268 report->freqoff = resp[5]; 1268 report->freqoff = resp[5];
@@ -1306,19 +1306,19 @@ static int si476x_core_cmd_fm_rsq_status_a30(struct si476x_core *core,
1306 if (err < 0 || report == NULL) 1306 if (err < 0 || report == NULL)
1307 return err; 1307 return err;
1308 1308
1309 report->multhint = 0b10000000 & resp[1]; 1309 report->multhint = 0x80 & resp[1];
1310 report->multlint = 0b01000000 & resp[1]; 1310 report->multlint = 0x40 & resp[1];
1311 report->snrhint = 0b00001000 & resp[1]; 1311 report->snrhint = 0x08 & resp[1];
1312 report->snrlint = 0b00000100 & resp[1]; 1312 report->snrlint = 0x04 & resp[1];
1313 report->rssihint = 0b00000010 & resp[1]; 1313 report->rssihint = 0x02 & resp[1];
1314 report->rssilint = 0b00000001 & resp[1]; 1314 report->rssilint = 0x01 & resp[1];
1315 1315
1316 report->bltf = 0b10000000 & resp[2]; 1316 report->bltf = 0x80 & resp[2];
1317 report->snr_ready = 0b00100000 & resp[2]; 1317 report->snr_ready = 0x20 & resp[2];
1318 report->rssiready = 0b00001000 & resp[2]; 1318 report->rssiready = 0x08 & resp[2];
1319 report->injside = 0b00000100 & resp[2]; 1319 report->injside = 0x04 & resp[2];
1320 report->afcrl = 0b00000010 & resp[2]; 1320 report->afcrl = 0x02 & resp[2];
1321 report->valid = 0b00000001 & resp[2]; 1321 report->valid = 0x01 & resp[2];
1322 1322
1323 report->readfreq = be16_to_cpup((__be16 *)(resp + 3)); 1323 report->readfreq = be16_to_cpup((__be16 *)(resp + 3));
1324 report->freqoff = resp[5]; 1324 report->freqoff = resp[5];