Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'mfd-fixes-3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-fixes

Pull mfd fixes from Samuel Ortiz:
"This is the first batch of MFD fixes for 3.10.

It's bigger than I would like, most of it is due to the big ab/db8500
merge that went through during the 3.10 merge window.

So we have:

- Some build fixes for the tps65912 and ab8500 drivers.
- A couple of build fixes for the the si476x driver with pre 4.3 gcc
compilers.
- A few runtime breakage fixes (probe failures or oopses) for the
ab8500 and db8500 drivers.
- Some sparse or regular gcc warning fixes for the si476x, ab8500 and
cros_ec drivers."

* tag 'mfd-fixes-3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-fixes:
mfd: ab8500-sysctrl: Let sysctrl driver work without pdata
mfd: db8500-prcmu: Update stored DSI PLL divider value
mfd: ab8500-sysctrl: Always enable pm_power_off handler
mfd: ab8500-core: Pass GPADC compatible string to MFD core
mfd: db8500-prcmu: Supply the pdata_size attribute for db8500-thermal
mfd: ab8500-core: Use the correct driver name when enabling gpio/pinctrl
mfd: ab8500: Pass AB8500 IRQ to debugfs code by resource
mfd: ab8500-gpadc: Suppress 'ignoring regulator_enable() return value' warning
mfd: ab8500-sysctrl: Set sysctrl_dev during probe
mfd: ab8500-sysctrl: Fix sparse warning
mfd: abx500-core: Fix sparse warning
mfd: ab8500: Debugfs code depends on gpadc
mfd: si476x: Use get_unaligned_be16() for unaligned be16 loads
mfd: cros_ec_spi: Use %z to format pointer differences
mfd: si476x: Do not use binary constants
mfd: tps65912: Select MFD_CORE

+132 -94
+2 -1
drivers/mfd/Kconfig
··· 579 579 580 580 config AB8500_DEBUG 581 581 bool "Enable debug info via debugfs" 582 - depends on AB8500_CORE && DEBUG_FS 582 + depends on AB8500_GPADC && DEBUG_FS 583 583 default y if DEBUG_FS 584 584 help 585 585 Select this option if you want debug information using the debug ··· 818 818 config MFD_TPS65912 819 819 bool "TI TPS65912 Power Management chip" 820 820 depends on GPIOLIB 821 + select MFD_CORE 821 822 help 822 823 If you say yes here you get support for the TPS65912 series of 823 824 PM chips.
+21 -3
drivers/mfd/ab8500-core.c
··· 868 868 #ifdef CONFIG_DEBUG_FS 869 869 static struct resource ab8500_debug_resources[] = { 870 870 { 871 + .name = "IRQ_AB8500", 872 + /* 873 + * Number will be filled in. NOTE: this is deliberately 874 + * not flagged as an IRQ in ordet to avoid remapping using 875 + * the irqdomain in the MFD core, so that this IRQ passes 876 + * unremapped to the debug code. 877 + */ 878 + }, 879 + { 871 880 .name = "IRQ_FIRST", 872 881 .start = AB8500_INT_MAIN_EXT_CH_NOT_OK, 873 882 .end = AB8500_INT_MAIN_EXT_CH_NOT_OK, ··· 1060 1051 }, 1061 1052 { 1062 1053 .name = "ab8500-gpadc", 1054 + .of_compatible = "stericsson,ab8500-gpadc", 1063 1055 .num_resources = ARRAY_SIZE(ab8500_gpadc_resources), 1064 1056 .resources = ab8500_gpadc_resources, 1065 1057 }, ··· 1107 1097 .of_compatible = "stericsson,ab8500-denc", 1108 1098 }, 1109 1099 { 1110 - .name = "ab8500-gpio", 1100 + .name = "pinctrl-ab8500", 1111 1101 .of_compatible = "stericsson,ab8500-gpio", 1112 1102 }, 1113 1103 { ··· 1218 1208 }, 1219 1209 { 1220 1210 .name = "ab8500-gpadc", 1211 + .of_compatible = "stericsson,ab8500-gpadc", 1221 1212 .num_resources = ARRAY_SIZE(ab8505_gpadc_resources), 1222 1213 .resources = ab8505_gpadc_resources, 1223 1214 }, ··· 1245 1234 .name = "ab8500-leds", 1246 1235 }, 1247 1236 { 1248 - .name = "ab8500-gpio", 1237 + .name = "pinctrl-ab8505", 1249 1238 }, 1250 1239 { 1251 1240 .name = "ab8500-usb", ··· 1282 1271 }, 1283 1272 { 1284 1273 .name = "ab8500-gpadc", 1274 + .of_compatible = "stericsson,ab8500-gpadc", 1285 1275 .num_resources = ARRAY_SIZE(ab8505_gpadc_resources), 1286 1276 .resources = ab8505_gpadc_resources, 1287 1277 }, ··· 1314 1302 .resources = ab8500_temp_resources, 1315 1303 }, 1316 1304 { 1317 - .name = "ab8500-gpio", 1305 + .name = "pinctrl-ab8540", 1318 1306 }, 1319 1307 { 1320 1308 .name = "ab8540-usb", ··· 1723 1711 "ab8500", ab8500); 1724 1712 if (ret) 1725 1713 return ret; 1714 + 1715 + #if CONFIG_DEBUG_FS 1716 + /* Pass to debugfs */ 1717 + ab8500_debug_resources[0].start = ab8500->irq; 1718 + ab8500_debug_resources[0].end = ab8500->irq; 1719 + #endif 1726 1720 1727 1721 if (is_ab9540(ab8500)) 1728 1722 ret = mfd_add_devices(ab8500->dev, 0, ab9540_devs,
+12 -4
drivers/mfd/ab8500-debugfs.c
··· 91 91 #include <linux/ctype.h> 92 92 #endif 93 93 94 - /* TODO: this file should not reference IRQ_DB8500_AB8500! */ 95 - #include <mach/irqs.h> 96 - 97 94 static u32 debug_bank; 98 95 static u32 debug_address; 99 96 97 + static int irq_ab8500; 100 98 static int irq_first; 101 99 static int irq_last; 102 100 static u32 *irq_count; ··· 1587 1589 { 1588 1590 if (line < num_interrupt_lines) { 1589 1591 num_interrupts[line]++; 1590 - if (suspend_test_wake_cause_interrupt_is_mine(IRQ_DB8500_AB8500)) 1592 + if (suspend_test_wake_cause_interrupt_is_mine(irq_ab8500)) 1591 1593 num_wake_interrupts[line]++; 1592 1594 } 1593 1595 } ··· 2939 2941 struct dentry *file; 2940 2942 int ret = -ENOMEM; 2941 2943 struct ab8500 *ab8500; 2944 + struct resource *res; 2942 2945 debug_bank = AB8500_MISC; 2943 2946 debug_address = AB8500_REV_REG & 0x00FF; 2944 2947 ··· 2957 2958 event_name = kzalloc(sizeof(*event_name)*num_irqs, GFP_KERNEL); 2958 2959 if (!event_name) 2959 2960 goto out_freedev_attr; 2961 + 2962 + res = platform_get_resource_byname(plf, 0, "IRQ_AB8500"); 2963 + if (!res) { 2964 + dev_err(&plf->dev, "AB8500 irq not found, err %d\n", 2965 + irq_first); 2966 + ret = -ENXIO; 2967 + goto out_freeevent_name; 2968 + } 2969 + irq_ab8500 = res->start; 2960 2970 2961 2971 irq_first = platform_get_irq_byname(plf, "IRQ_FIRST"); 2962 2972 if (irq_first < 0) {
+5 -2
drivers/mfd/ab8500-gpadc.c
··· 907 907 static int ab8500_gpadc_resume(struct device *dev) 908 908 { 909 909 struct ab8500_gpadc *gpadc = dev_get_drvdata(dev); 910 + int ret; 910 911 911 - regulator_enable(gpadc->regu); 912 + ret = regulator_enable(gpadc->regu); 913 + if (ret) 914 + dev_err(dev, "Failed to enable vtvout LDO: %d\n", ret); 912 915 913 916 pm_runtime_mark_last_busy(gpadc->dev); 914 917 pm_runtime_put_autosuspend(gpadc->dev); 915 918 916 919 mutex_unlock(&gpadc->ab8500_gpadc_lock); 917 - return 0; 920 + return ret; 918 921 } 919 922 920 923 static int ab8500_gpadc_probe(struct platform_device *pdev)
+10 -5
drivers/mfd/ab8500-sysctrl.c
··· 23 23 24 24 static struct device *sysctrl_dev; 25 25 26 - void ab8500_power_off(void) 26 + static void ab8500_power_off(void) 27 27 { 28 28 sigset_t old; 29 29 sigset_t all; ··· 104 104 105 105 plat = dev_get_platdata(sysctrl_dev->parent); 106 106 pdata = plat->sysctrl; 107 - if (pdata->reboot_reason_code) 107 + if (pdata && pdata->reboot_reason_code) 108 108 reason = pdata->reboot_reason_code(cmd); 109 109 else 110 110 pr_warn("[%s] No reboot reason set. Default reason %d\n", ··· 188 188 189 189 plat = dev_get_platdata(pdev->dev.parent); 190 190 191 - if (!(plat && plat->sysctrl)) 191 + if (!plat) 192 192 return -EINVAL; 193 193 194 - if (plat->pm_power_off) 194 + sysctrl_dev = &pdev->dev; 195 + 196 + if (!pm_power_off) 195 197 pm_power_off = ab8500_power_off; 196 198 197 199 pdata = plat->sysctrl; 198 - 199 200 if (pdata) { 200 201 int last, ret, i, j; 201 202 ··· 227 226 static int ab8500_sysctrl_remove(struct platform_device *pdev) 228 227 { 229 228 sysctrl_dev = NULL; 229 + 230 + if (pm_power_off == ab8500_power_off) 231 + pm_power_off = NULL; 232 + 230 233 return 0; 231 234 } 232 235
+1 -1
drivers/mfd/abx500-core.c
··· 156 156 void abx500_dump_all_banks(void) 157 157 { 158 158 struct abx500_ops *ops; 159 - struct device dummy_child = {0}; 159 + struct device dummy_child = {NULL}; 160 160 struct abx500_device_entry *dev_entry; 161 161 162 162 list_for_each_entry(dev_entry, &abx500_list, list) {
+3 -3
drivers/mfd/cros_ec_spi.c
··· 120 120 121 121 for (end = ptr + EC_MSG_PREAMBLE_COUNT; ptr != end; ptr++) { 122 122 if (*ptr == EC_MSG_HEADER) { 123 - dev_dbg(ec_dev->dev, "msg found at %ld\n", 123 + dev_dbg(ec_dev->dev, "msg found at %zd\n", 124 124 ptr - ec_dev->din); 125 125 break; 126 126 } ··· 154 154 * maximum-supported transfer size. 155 155 */ 156 156 todo = min(need_len, 256); 157 - dev_dbg(ec_dev->dev, "loop, todo=%d, need_len=%d, ptr=%ld\n", 157 + dev_dbg(ec_dev->dev, "loop, todo=%d, need_len=%d, ptr=%zd\n", 158 158 todo, need_len, ptr - ec_dev->din); 159 159 160 160 memset(&trans, '\0', sizeof(trans)); ··· 178 178 need_len -= todo; 179 179 } 180 180 181 - dev_dbg(ec_dev->dev, "loop done, ptr=%ld\n", ptr - ec_dev->din); 181 + dev_dbg(ec_dev->dev, "loop done, ptr=%zd\n", ptr - ec_dev->din); 182 182 183 183 return 0; 184 184 }
+3
drivers/mfd/db8500-prcmu.c
··· 1613 1613 1614 1614 if (divsel == PRCM_DSI_PLLOUT_SEL_OFF) 1615 1615 divsel = dsiclk[n].divsel; 1616 + else 1617 + dsiclk[n].divsel = divsel; 1616 1618 1617 1619 switch (divsel) { 1618 1620 case PRCM_DSI_PLLOUT_SEL_PHI_4: ··· 3097 3095 .num_resources = ARRAY_SIZE(db8500_thsens_resources), 3098 3096 .resources = db8500_thsens_resources, 3099 3097 .platform_data = &db8500_thsens_data, 3098 + .pdata_size = sizeof(db8500_thsens_data), 3100 3099 }, 3101 3100 }; 3102 3101
+75 -73
drivers/mfd/si476x-cmd.c
··· 29 29 30 30 #include <linux/mfd/si476x-core.h> 31 31 32 + #include <asm/unaligned.h> 33 + 32 34 #define msb(x) ((u8)((u16) x >> 8)) 33 35 #define lsb(x) ((u8)((u16) x & 0x00FF)) 34 36 ··· 152 150 SI476X_ACF_SOFTMUTE_INT = (1 << 0), 153 151 154 152 SI476X_ACF_SMUTE = (1 << 0), 155 - SI476X_ACF_SMATTN = 0b11111, 153 + SI476X_ACF_SMATTN = 0x1f, 156 154 SI476X_ACF_PILOT = (1 << 7), 157 155 SI476X_ACF_STBLEND = ~SI476X_ACF_PILOT, 158 156 }; ··· 485 483 if (err < 0) 486 484 return err; 487 485 else 488 - return be16_to_cpup((__be16 *)(resp + 2)); 486 + return get_unaligned_be16(resp + 2); 489 487 } 490 488 EXPORT_SYMBOL_GPL(si476x_core_cmd_get_property); 491 489 ··· 774 772 if (!report) 775 773 return err; 776 774 777 - report->snrhint = 0b00001000 & resp[1]; 778 - report->snrlint = 0b00000100 & resp[1]; 779 - report->rssihint = 0b00000010 & resp[1]; 780 - report->rssilint = 0b00000001 & resp[1]; 775 + report->snrhint = 0x08 & resp[1]; 776 + report->snrlint = 0x04 & resp[1]; 777 + report->rssihint = 0x02 & resp[1]; 778 + report->rssilint = 0x01 & resp[1]; 781 779 782 - report->bltf = 0b10000000 & resp[2]; 783 - report->snr_ready = 0b00100000 & resp[2]; 784 - report->rssiready = 0b00001000 & resp[2]; 785 - report->afcrl = 0b00000010 & resp[2]; 786 - report->valid = 0b00000001 & resp[2]; 780 + report->bltf = 0x80 & resp[2]; 781 + report->snr_ready = 0x20 & resp[2]; 782 + report->rssiready = 0x08 & resp[2]; 783 + report->afcrl = 0x02 & resp[2]; 784 + report->valid = 0x01 & resp[2]; 787 785 788 - report->readfreq = be16_to_cpup((__be16 *)(resp + 3)); 786 + report->readfreq = get_unaligned_be16(resp + 3); 789 787 report->freqoff = resp[5]; 790 788 report->rssi = resp[6]; 791 789 report->snr = resp[7]; ··· 933 931 if (err < 0 || report == NULL) 934 932 return err; 935 933 936 - report->rdstpptyint = 0b00010000 & resp[1]; 937 - report->rdspiint = 0b00001000 & resp[1]; 938 - report->rdssyncint = 0b00000010 & resp[1]; 939 - report->rdsfifoint = 0b00000001 & resp[1]; 934 + report->rdstpptyint = 0x10 & resp[1]; 935 + report->rdspiint = 0x08 & resp[1]; 936 + report->rdssyncint = 0x02 & resp[1]; 937 + report->rdsfifoint = 0x01 & resp[1]; 940 938 941 - report->tpptyvalid = 0b00010000 & resp[2]; 942 - report->pivalid = 0b00001000 & resp[2]; 943 - report->rdssync = 0b00000010 & resp[2]; 944 - report->rdsfifolost = 0b00000001 & resp[2]; 939 + report->tpptyvalid = 0x10 & resp[2]; 940 + report->pivalid = 0x08 & resp[2]; 941 + report->rdssync = 0x02 & resp[2]; 942 + report->rdsfifolost = 0x01 & resp[2]; 945 943 946 - report->tp = 0b00100000 & resp[3]; 947 - report->pty = 0b00011111 & resp[3]; 944 + report->tp = 0x20 & resp[3]; 945 + report->pty = 0x1f & resp[3]; 948 946 949 - report->pi = be16_to_cpup((__be16 *)(resp + 4)); 947 + report->pi = get_unaligned_be16(resp + 4); 950 948 report->rdsfifoused = resp[6]; 951 949 952 - report->ble[V4L2_RDS_BLOCK_A] = 0b11000000 & resp[7]; 953 - report->ble[V4L2_RDS_BLOCK_B] = 0b00110000 & resp[7]; 954 - report->ble[V4L2_RDS_BLOCK_C] = 0b00001100 & resp[7]; 955 - report->ble[V4L2_RDS_BLOCK_D] = 0b00000011 & resp[7]; 950 + report->ble[V4L2_RDS_BLOCK_A] = 0xc0 & resp[7]; 951 + report->ble[V4L2_RDS_BLOCK_B] = 0x30 & resp[7]; 952 + report->ble[V4L2_RDS_BLOCK_C] = 0x0c & resp[7]; 953 + report->ble[V4L2_RDS_BLOCK_D] = 0x03 & resp[7]; 956 954 957 955 report->rds[V4L2_RDS_BLOCK_A].block = V4L2_RDS_BLOCK_A; 958 956 report->rds[V4L2_RDS_BLOCK_A].msb = resp[8]; ··· 993 991 SI476X_DEFAULT_TIMEOUT); 994 992 995 993 if (!err) { 996 - report->expected = be16_to_cpup((__be16 *)(resp + 2)); 997 - report->received = be16_to_cpup((__be16 *)(resp + 4)); 998 - report->uncorrectable = be16_to_cpup((__be16 *)(resp + 6)); 994 + report->expected = get_unaligned_be16(resp + 2); 995 + report->received = get_unaligned_be16(resp + 4); 996 + report->uncorrectable = get_unaligned_be16(resp + 6); 999 997 } 1000 998 1001 999 return err; ··· 1007 1005 { 1008 1006 u8 resp[CMD_FM_PHASE_DIVERSITY_NRESP]; 1009 1007 const u8 args[CMD_FM_PHASE_DIVERSITY_NARGS] = { 1010 - mode & 0b111, 1008 + mode & 0x07, 1011 1009 }; 1012 1010 1013 1011 return si476x_core_send_command(core, CMD_FM_PHASE_DIVERSITY, ··· 1164 1162 const int am_freq = tuneargs->freq; 1165 1163 u8 resp[CMD_AM_TUNE_FREQ_NRESP]; 1166 1164 const u8 args[CMD_AM_TUNE_FREQ_NARGS] = { 1167 - (tuneargs->zifsr << 6) | (tuneargs->injside & 0b11), 1165 + (tuneargs->zifsr << 6) | (tuneargs->injside & 0x03), 1168 1166 msb(am_freq), 1169 1167 lsb(am_freq), 1170 1168 }; ··· 1199 1197 if (err < 0 || report == NULL) 1200 1198 return err; 1201 1199 1202 - report->multhint = 0b10000000 & resp[1]; 1203 - report->multlint = 0b01000000 & resp[1]; 1204 - report->snrhint = 0b00001000 & resp[1]; 1205 - report->snrlint = 0b00000100 & resp[1]; 1206 - report->rssihint = 0b00000010 & resp[1]; 1207 - report->rssilint = 0b00000001 & resp[1]; 1200 + report->multhint = 0x80 & resp[1]; 1201 + report->multlint = 0x40 & resp[1]; 1202 + report->snrhint = 0x08 & resp[1]; 1203 + report->snrlint = 0x04 & resp[1]; 1204 + report->rssihint = 0x02 & resp[1]; 1205 + report->rssilint = 0x01 & resp[1]; 1208 1206 1209 - report->bltf = 0b10000000 & resp[2]; 1210 - report->snr_ready = 0b00100000 & resp[2]; 1211 - report->rssiready = 0b00001000 & resp[2]; 1212 - report->afcrl = 0b00000010 & resp[2]; 1213 - report->valid = 0b00000001 & resp[2]; 1207 + report->bltf = 0x80 & resp[2]; 1208 + report->snr_ready = 0x20 & resp[2]; 1209 + report->rssiready = 0x08 & resp[2]; 1210 + report->afcrl = 0x02 & resp[2]; 1211 + report->valid = 0x01 & resp[2]; 1214 1212 1215 - report->readfreq = be16_to_cpup((__be16 *)(resp + 3)); 1213 + report->readfreq = get_unaligned_be16(resp + 3); 1216 1214 report->freqoff = resp[5]; 1217 1215 report->rssi = resp[6]; 1218 1216 report->snr = resp[7]; ··· 1220 1218 report->hassi = resp[10]; 1221 1219 report->mult = resp[11]; 1222 1220 report->dev = resp[12]; 1223 - report->readantcap = be16_to_cpup((__be16 *)(resp + 13)); 1221 + report->readantcap = get_unaligned_be16(resp + 13); 1224 1222 report->assi = resp[15]; 1225 1223 report->usn = resp[16]; 1226 1224 ··· 1253 1251 if (err < 0 || report == NULL) 1254 1252 return err; 1255 1253 1256 - report->multhint = 0b10000000 & resp[1]; 1257 - report->multlint = 0b01000000 & resp[1]; 1258 - report->snrhint = 0b00001000 & resp[1]; 1259 - report->snrlint = 0b00000100 & resp[1]; 1260 - report->rssihint = 0b00000010 & resp[1]; 1261 - report->rssilint = 0b00000001 & resp[1]; 1254 + report->multhint = 0x80 & resp[1]; 1255 + report->multlint = 0x40 & resp[1]; 1256 + report->snrhint = 0x08 & resp[1]; 1257 + report->snrlint = 0x04 & resp[1]; 1258 + report->rssihint = 0x02 & resp[1]; 1259 + report->rssilint = 0x01 & resp[1]; 1262 1260 1263 - report->bltf = 0b10000000 & resp[2]; 1264 - report->snr_ready = 0b00100000 & resp[2]; 1265 - report->rssiready = 0b00001000 & resp[2]; 1266 - report->afcrl = 0b00000010 & resp[2]; 1267 - report->valid = 0b00000001 & resp[2]; 1261 + report->bltf = 0x80 & resp[2]; 1262 + report->snr_ready = 0x20 & resp[2]; 1263 + report->rssiready = 0x08 & resp[2]; 1264 + report->afcrl = 0x02 & resp[2]; 1265 + report->valid = 0x01 & resp[2]; 1268 1266 1269 - report->readfreq = be16_to_cpup((__be16 *)(resp + 3)); 1267 + report->readfreq = get_unaligned_be16(resp + 3); 1270 1268 report->freqoff = resp[5]; 1271 1269 report->rssi = resp[6]; 1272 1270 report->snr = resp[7]; ··· 1274 1272 report->hassi = resp[10]; 1275 1273 report->mult = resp[11]; 1276 1274 report->dev = resp[12]; 1277 - report->readantcap = be16_to_cpup((__be16 *)(resp + 13)); 1275 + report->readantcap = get_unaligned_be16(resp + 13); 1278 1276 report->assi = resp[15]; 1279 1277 report->usn = resp[16]; 1280 1278 ··· 1308 1306 if (err < 0 || report == NULL) 1309 1307 return err; 1310 1308 1311 - report->multhint = 0b10000000 & resp[1]; 1312 - report->multlint = 0b01000000 & resp[1]; 1313 - report->snrhint = 0b00001000 & resp[1]; 1314 - report->snrlint = 0b00000100 & resp[1]; 1315 - report->rssihint = 0b00000010 & resp[1]; 1316 - report->rssilint = 0b00000001 & resp[1]; 1309 + report->multhint = 0x80 & resp[1]; 1310 + report->multlint = 0x40 & resp[1]; 1311 + report->snrhint = 0x08 & resp[1]; 1312 + report->snrlint = 0x04 & resp[1]; 1313 + report->rssihint = 0x02 & resp[1]; 1314 + report->rssilint = 0x01 & resp[1]; 1317 1315 1318 - report->bltf = 0b10000000 & resp[2]; 1319 - report->snr_ready = 0b00100000 & resp[2]; 1320 - report->rssiready = 0b00001000 & resp[2]; 1321 - report->injside = 0b00000100 & resp[2]; 1322 - report->afcrl = 0b00000010 & resp[2]; 1323 - report->valid = 0b00000001 & resp[2]; 1316 + report->bltf = 0x80 & resp[2]; 1317 + report->snr_ready = 0x20 & resp[2]; 1318 + report->rssiready = 0x08 & resp[2]; 1319 + report->injside = 0x04 & resp[2]; 1320 + report->afcrl = 0x02 & resp[2]; 1321 + report->valid = 0x01 & resp[2]; 1324 1322 1325 - report->readfreq = be16_to_cpup((__be16 *)(resp + 3)); 1323 + report->readfreq = get_unaligned_be16(resp + 3); 1326 1324 report->freqoff = resp[5]; 1327 1325 report->rssi = resp[6]; 1328 1326 report->snr = resp[7]; ··· 1331 1329 report->hassi = resp[10]; 1332 1330 report->mult = resp[11]; 1333 1331 report->dev = resp[12]; 1334 - report->readantcap = be16_to_cpup((__be16 *)(resp + 13)); 1332 + report->readantcap = get_unaligned_be16(resp + 13); 1335 1333 report->assi = resp[15]; 1336 1334 report->usn = resp[16]; 1337 1335 ··· 1339 1337 report->rdsdev = resp[18]; 1340 1338 report->assidev = resp[19]; 1341 1339 report->strongdev = resp[20]; 1342 - report->rdspi = be16_to_cpup((__be16 *)(resp + 21)); 1340 + report->rdspi = get_unaligned_be16(resp + 21); 1343 1341 1344 1342 return err; 1345 1343 }
-2
include/linux/mfd/abx500/ab8500.h
··· 373 373 /** 374 374 * struct ab8500_platform_data - AB8500 platform data 375 375 * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used 376 - * @pm_power_off: Should machine pm power off hook be registered or not 377 376 * @init: board-specific initialization after detection of ab8500 378 377 * @regulator: machine-specific constraints for regulators 379 378 */ 380 379 struct ab8500_platform_data { 381 380 int irq_base; 382 - bool pm_power_off; 383 381 void (*init) (struct ab8500 *); 384 382 struct ab8500_regulator_platform_data *regulator; 385 383 struct abx500_gpio_platform_data *gpio;