1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 02:43:24 +03:00
mobile-nixos/devices/asus-z00t/kernel/0001-firmware-class-Remove-rude-firmware-path-trampling.patch
2020-04-09 22:27:15 -04:00

66 lines
2.0 KiB
Diff

From 4f043959ff18e59a47c7e480b73406f9e190e542 Mon Sep 17 00:00:00 2001
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
Date: Thu, 9 Apr 2020 01:07:39 -0400
Subject: [PATCH] firmware class: Remove rude firmware path trampling
This *may* not be OEM code, but from a well-intentioned attempt when
merging the different ASUS kernel trees.
Nonetheless, this breaks some assumptions in how we should be able to
configure this path.
---
drivers/base/firmware_class.c | 30 ------------------------------
1 file changed, 30 deletions(-)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index a9b9b2e3717e4..6b7bd9c651886 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -350,35 +350,6 @@ static bool fw_read_file_contents(struct file *file, struct firmware_buf *fw_buf
return true;
}
-int modem_fw_path_applied = 0;
-
-static void __apply_volte_modem_fw_path(void) {
- modem_fw_path_applied = 1;
-
- if (asus_PRJ_ID != ASUS_ZE550KL && asus_PRJ_ID != ASUS_ZD550KL) {
- return;
- }
-
- if (cpu_is_msm8916()) {
- strcpy(fw_path_para, "/etc/firmware/8916_volte_modem");
- } else if (cpu_is_msm8939()) {
- if (asus_PRJ_ID == ASUS_ZD550KL) {
- strcpy(fw_path_para, "/etc/firmware/8939_ZD550KL_volte_modem");
- } else {
- strcpy(fw_path_para, "/etc/firmware/8939_volte_modem");
- }
- } else {
- printk(KERN_ERR "%s:unknown cpu id\n", __func__);
- }
- pr_debug("%s: volte_modem_path=%s\n", __func__, fw_path_para);
-}
-
-static void apply_volte_modem_fw_path(void) {
- if (modem_fw_path_applied == 0) {
- __apply_volte_modem_fw_path();
- }
-}
-
static bool fw_get_filesystem_firmware(struct device *device,
struct firmware_buf *buf,
phys_addr_t dest_addr, size_t dest_size)
@@ -386,7 +357,6 @@ static bool fw_get_filesystem_firmware(struct device *device,
int i;
bool success = false;
char *path = __getname();
- apply_volte_modem_fw_path();
for (i = 0; i < ARRAY_SIZE(fw_path); i++) {
struct file *file;
--
2.23.1