Skip to content

Commit 0f3aa48

Browse files
committed
Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from Olof Johansson: "A few more fixes who have trickled in: - MMC bus width fixup for some Allwinner platforms - Fix for NULL deref in ti-aemif when no platform data is passed in - Fix div by 0 in SCMI code - Add a missing module alias in a new RPi driver" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: memory: ti-aemif: fix a potential NULL-pointer dereference firmware: arm_scmi: fix divide by zero when sustained_perf_level is zero hwmon: rpi: add module alias to raspberrypi-hwmon arm64: allwinner: dts: h6: fix Pine H64 MMC bus width
2 parents d7b686e + a132bb9 commit 0f3aa48

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
pinctrl-0 = <&mmc0_pins>;
4747
vmmc-supply = <&reg_cldo1>;
4848
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
49+
bus-width = <4>;
4950
status = "okay";
5051
};
5152

@@ -56,6 +57,7 @@
5657
vqmmc-supply = <&reg_bldo2>;
5758
non-removable;
5859
cap-mmc-hw-reset;
60+
bus-width = <8>;
5961
status = "okay";
6062
};
6163

drivers/firmware/arm_scmi/perf.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,13 @@ scmi_perf_domain_attributes_get(const struct scmi_handle *handle, u32 domain,
166166
le32_to_cpu(attr->sustained_freq_khz);
167167
dom_info->sustained_perf_level =
168168
le32_to_cpu(attr->sustained_perf_level);
169-
dom_info->mult_factor = (dom_info->sustained_freq_khz * 1000) /
169+
if (!dom_info->sustained_freq_khz ||
170+
!dom_info->sustained_perf_level)
171+
/* CPUFreq converts to kHz, hence default 1000 */
172+
dom_info->mult_factor = 1000;
173+
else
174+
dom_info->mult_factor =
175+
(dom_info->sustained_freq_khz * 1000) /
170176
dom_info->sustained_perf_level;
171177
memcpy(dom_info->name, attr->name, SCMI_MAX_STR_SIZE);
172178
}

drivers/hwmon/raspberrypi-hwmon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,4 @@ module_platform_driver(rpi_hwmon_driver);
164164
MODULE_AUTHOR("Stefan Wahren <stefan.wahren@i2se.com>");
165165
MODULE_DESCRIPTION("Raspberry Pi voltage sensor driver");
166166
MODULE_LICENSE("GPL v2");
167+
MODULE_ALIAS("platform:raspberrypi-hwmon");

drivers/memory/ti-aemif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ static int aemif_probe(struct platform_device *pdev)
411411
if (ret < 0)
412412
goto error;
413413
}
414-
} else {
414+
} else if (pdata) {
415415
for (i = 0; i < pdata->num_sub_devices; i++) {
416416
pdata->sub_devices[i].dev.parent = dev;
417417
ret = platform_device_register(&pdata->sub_devices[i]);

0 commit comments

Comments
 (0)