armbian_build/patch/kernel/archive/sunxi-6.6/patches.fixes/Fix-ISO-C90-forbids-mixed-declarations.patch
Gunjan Gupta d1186b8a0e kernel: sunxi: Add patches for 6.6 kernel
I have changed the way the patches are generated a bit. Instead of using orange-pi branch from megous tree for 6.6 kernel, I have used the following kernel branches

	a83t-suspend, af8133j, anx, audio,
	axp, cam, drm, err, fixes, mbus,
	modem, opi3, pb, pinetab, pp, ppkb,
	samuel, speed, tbs-a711, ths

These branches were carefully chosen to include only allwinner related patches and remove importing of the rockchip related patches into the allwinner kernel.

Following patches are modified to fix patch application failure
- patches.armbian/arm64-dts-sun50i-h616-orangepi-zero2-reg_usb1_vbus-status-ok.patch
- patches.armbian/arm64-dts-sun50i-h616-orangepi-zero2-Enable-GPU-mali.patch
- patches.armbian/arm64-dts-allwinner-h616-Add-efuse_xlate-cpu-frequency-scaling-v1_6_2.patch
- patches.armbian/arm64-dts-allwinner-h616-LED-green_power_on-red_status_heartbeat.patch
- patches.armbian/arm64-dts-allwinner-overlay-Add-Overlays-for-sunxi64.patch
- patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1.patch

Following patches are modified because of kernel api change to fix compilation failure
- patches.armbian/drv-gpu-drm-sun4i-Add-HDMI-audio-sun4i-hdmi-encoder.patch
- patches.armbian/drv-of-Device-Tree-Overlay-ConfigFS-interface.patch
2023-10-30 22:58:11 +05:30

71 lines
2.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Fri, 16 Dec 2022 16:02:13 +0300
Subject: Fix: ISO C90 forbids mixed declarations
---
drivers/usb/typec/tcpm/fusb302.c | 22 ++++++----
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c
index b34e4dd6a4f1..6efc4e4fe333 100644
--- a/drivers/usb/typec/tcpm/fusb302.c
+++ b/drivers/usb/typec/tcpm/fusb302.c
@@ -1620,6 +1620,10 @@ static irqreturn_t fusb302_irq_intn(int irq, void *dev_id)
static void fusb302_print_state(struct fusb302_chip *chip)
{
u8 ctl0, ctl2, measure, status0, status1a, sw0, mask;
+ unsigned vbusok, activity, comp, wake, mdac, togss;
+ const char* host_cur;
+ const char* bc_lvl;
+ const char* togss_s;
int ret;
ret = fusb302_i2c_read(chip, FUSB_REG_CONTROL0, &ctl0);
@@ -1646,7 +1650,7 @@ static void fusb302_print_state(struct fusb302_chip *chip)
//FUSB_REG(FUSB_REG_POWER) // power control
- const char* host_cur = "?";
+ host_cur = "?";
switch ((ctl0 >> 2) & 3) {
case 0: host_cur = "none"; break;
case 1: host_cur = "80uA"; break;
@@ -1654,7 +1658,7 @@ static void fusb302_print_state(struct fusb302_chip *chip)
case 3: host_cur = "330uA"; break;
}
- const char* bc_lvl = "?";
+ bc_lvl = "?";
switch (status0 & 3) {
case 0: bc_lvl = "0-200mV"; break;
case 1: bc_lvl = "200-660mV"; break;
@@ -1663,17 +1667,17 @@ static void fusb302_print_state(struct fusb302_chip *chip)
}
// status0
- unsigned vbusok = !!(status0 & BIT(7));
- unsigned activity = !!(status0 & BIT(6));
- unsigned comp = !!(status0 & BIT(5));
- unsigned wake = !!(status0 & BIT(2));
+ vbusok = !!(status0 & BIT(7));
+ activity = !!(status0 & BIT(6));
+ comp = !!(status0 & BIT(5));
+ wake = !!(status0 & BIT(2));
// measure
- unsigned mdac = ((measure & 0x3f) + 1) * 42 * (measure & BIT(6) ? 10 : 1);
+ mdac = ((measure & 0x3f) + 1) * 42 * (measure & BIT(6) ? 10 : 1);
// status1a
- unsigned togss = (status1a >> 3) & 7;
- const char* togss_s = "?";
+ togss = (status1a >> 3) & 7;
+ togss_s = "?";
switch (togss) {
case 0: togss_s = "running"; break;
case 1: togss_s = "src1"; break;
--
Armbian