PKGBUILDs/alarm/raspberrypi-utils/0001-Revert-dtmerge-Make-i2c_arm-vc-creation-conditional.patch

39 lines
1.5 KiB
Diff
Raw Permalink Normal View History

From ec97b31b7e3c0bfaba2ca4ce2e6dcb9af11901ea Mon Sep 17 00:00:00 2001
From: graysky <therealgraysky@proton.me>
Date: Sat, 3 Feb 2024 11:42:33 -0500
Subject: [PATCH] Revert "dtmerge: Make i2c_arm/vc creation conditional"
This reverts commit a6d50754172884d9809d90db3253b689270ad04f.
---
dtmerge/dtmerge.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/dtmerge/dtmerge.c b/dtmerge/dtmerge.c
index 7f027fd..2d2b81c 100644
--- a/dtmerge/dtmerge.c
+++ b/dtmerge/dtmerge.c
@@ -109,14 +109,12 @@ int main(int argc, char **argv)
"compatible", &compatible_len);
dtoverlay_init_map(overlay_dir, compatible, compatible_len);
- if (!dtoverlay_get_alias(base_dtb, "i2c"))
- {
- err = dtoverlay_set_synonym(base_dtb, "i2c_arm", "i2c0");
- err = dtoverlay_set_synonym(base_dtb, "i2c_vc", "i2c1");
- err = dtoverlay_set_synonym(base_dtb, "i2c_baudrate", "i2c0_baudrate");
- err = dtoverlay_set_synonym(base_dtb, "i2c_arm_baudrate", "i2c0_baudrate");
- err = dtoverlay_set_synonym(base_dtb, "i2c_vc_baudrate", "i2c1_baudrate");
- };
+ err = dtoverlay_set_synonym(base_dtb, "i2c", "i2c0");
+ err = dtoverlay_set_synonym(base_dtb, "i2c_arm", "i2c0");
+ err = dtoverlay_set_synonym(base_dtb, "i2c_vc", "i2c1");
+ err = dtoverlay_set_synonym(base_dtb, "i2c_baudrate", "i2c0_baudrate");
+ err = dtoverlay_set_synonym(base_dtb, "i2c_arm_baudrate", "i2c0_baudrate");
+ err = dtoverlay_set_synonym(base_dtb, "i2c_vc_baudrate", "i2c1_baudrate");
if (strcmp(overlay_file, "-") == 0)
{
--
2.43.0