Commit 0f3aa48a authored by Linus Torvalds's avatar Linus Torvalds

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
parents d7b686eb a132bb90
...@@ -46,6 +46,7 @@ &mmc0 { ...@@ -46,6 +46,7 @@ &mmc0 {
pinctrl-0 = <&mmc0_pins>; pinctrl-0 = <&mmc0_pins>;
vmmc-supply = <&reg_cldo1>; vmmc-supply = <&reg_cldo1>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
bus-width = <4>;
status = "okay"; status = "okay";
}; };
...@@ -56,6 +57,7 @@ &mmc2 { ...@@ -56,6 +57,7 @@ &mmc2 {
vqmmc-supply = <&reg_bldo2>; vqmmc-supply = <&reg_bldo2>;
non-removable; non-removable;
cap-mmc-hw-reset; cap-mmc-hw-reset;
bus-width = <8>;
status = "okay"; status = "okay";
}; };
......
...@@ -166,7 +166,13 @@ scmi_perf_domain_attributes_get(const struct scmi_handle *handle, u32 domain, ...@@ -166,7 +166,13 @@ scmi_perf_domain_attributes_get(const struct scmi_handle *handle, u32 domain,
le32_to_cpu(attr->sustained_freq_khz); le32_to_cpu(attr->sustained_freq_khz);
dom_info->sustained_perf_level = dom_info->sustained_perf_level =
le32_to_cpu(attr->sustained_perf_level); le32_to_cpu(attr->sustained_perf_level);
dom_info->mult_factor = (dom_info->sustained_freq_khz * 1000) / if (!dom_info->sustained_freq_khz ||
!dom_info->sustained_perf_level)
/* CPUFreq converts to kHz, hence default 1000 */
dom_info->mult_factor = 1000;
else
dom_info->mult_factor =
(dom_info->sustained_freq_khz * 1000) /
dom_info->sustained_perf_level; dom_info->sustained_perf_level;
memcpy(dom_info->name, attr->name, SCMI_MAX_STR_SIZE); memcpy(dom_info->name, attr->name, SCMI_MAX_STR_SIZE);
} }
......
...@@ -164,3 +164,4 @@ module_platform_driver(rpi_hwmon_driver); ...@@ -164,3 +164,4 @@ module_platform_driver(rpi_hwmon_driver);
MODULE_AUTHOR("Stefan Wahren <stefan.wahren@i2se.com>"); MODULE_AUTHOR("Stefan Wahren <stefan.wahren@i2se.com>");
MODULE_DESCRIPTION("Raspberry Pi voltage sensor driver"); MODULE_DESCRIPTION("Raspberry Pi voltage sensor driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:raspberrypi-hwmon");
...@@ -411,7 +411,7 @@ static int aemif_probe(struct platform_device *pdev) ...@@ -411,7 +411,7 @@ static int aemif_probe(struct platform_device *pdev)
if (ret < 0) if (ret < 0)
goto error; goto error;
} }
} else { } else if (pdata) {
for (i = 0; i < pdata->num_sub_devices; i++) { for (i = 0; i < pdata->num_sub_devices; i++) {
pdata->sub_devices[i].dev.parent = dev; pdata->sub_devices[i].dev.parent = dev;
ret = platform_device_register(&pdata->sub_devices[i]); ret = platform_device_register(&pdata->sub_devices[i]);
......
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