hw_caps: simplify and unify initialized handling

Origin commit data
------------------
Branch: master
Commit: 5ec4e4f22f
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-05-29 (Sat, 29 May 2021)

Origin message was:
------------------
- hw_caps: simplify and unify initialized handling

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2021-05-29 20:49:47 +02:00
parent e7578702e0
commit cef23d5de4
6 changed files with 10 additions and 37 deletions

View File

@@ -35,7 +35,6 @@ hw_caps_t *get_hwcaps(void)
caps.can_pip = 0;
#if BOXMODEL_VUSOLO4K
initialized = 1;
caps.has_CI = 1;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -57,7 +56,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "BCM7376");
#endif
#if BOXMODEL_VUDUO4K
initialized = 1;
caps.has_CI = 2;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -80,7 +78,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "BCM7278");
#endif
#if BOXMODEL_VUDUO4KSE
initialized = 1;
caps.has_CI = 2;
caps.can_cec = 1;
caps.can_shutdown = 1;
@@ -102,7 +99,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "BCM7444S");
#endif
#if BOXMODEL_VUULTIMO4K
initialized = 1;
caps.has_CI = 2;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -125,7 +121,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "BCM7444S");
#endif
#if BOXMODEL_VUZERO4K
initialized = 1;
caps.has_CI = 1;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -145,7 +140,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "BCM72604");
#endif
#if BOXMODEL_VUUNO4KSE
initialized = 1;
caps.has_CI = 1;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -168,7 +162,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "BCM7252S");
#endif
#if BOXMODEL_VUUNO4K
initialized = 1;
caps.has_CI = 1;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -188,7 +181,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "BCM7252S");
#endif
#if BOXMODEL_HD51
initialized = 1;
caps.has_CI = 1;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -209,7 +201,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "BCM7251S");
#endif
#if BOXMODEL_BRE2ZE4K
initialized = 1;
caps.has_CI = 1;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -230,7 +221,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "BCM7251S");
#endif
#if BOXMODEL_H7
initialized = 1;
caps.has_CI = 1;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -251,7 +241,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "BCM7251S");
#endif
#if BOXMODEL_HD60
initialized = 1;
caps.has_CI = 0;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -272,7 +261,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "HI3798M");
#endif
#if BOXMODEL_HD61
initialized = 1;
caps.has_CI = 2;
caps.can_cec = 1;
caps.can_shutdown = 1;
@@ -291,7 +279,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "HI3798M");
#endif
#if BOXMODEL_MULTIBOXSE
initialized = 1;
caps.has_CI = 0;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -312,7 +299,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "HI3798M");
#endif
#if BOXMODEL_OSMINI4K
initialized = 1;
caps.has_CI = 0;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -333,7 +319,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "BCM72604");
#endif
#if BOXMODEL_OSMIO4K
initialized = 1;
caps.has_CI = 0;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -354,7 +339,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxarch, "BCM72604");
#endif
#if BOXMODEL_OSMIO4KPLUS
initialized = 1;
caps.has_CI = 0;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -375,5 +359,7 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxname, "OS mio+ 4K");
strcpy(caps.boxarch, "BCM72604");
#endif
initialized = 1;
return &caps;
}

View File

@@ -32,7 +32,6 @@ hw_caps_t *get_hwcaps(void)
caps.can_pip = 0;
#if BOXMODEL_UFS910
initialized = 1;
strcpy(caps.boxvendor, "KATHREIN");
strcpy(caps.boxname, "UFS910");
strcpy(caps.boxarch, "STX7100");
@@ -50,7 +49,6 @@ hw_caps_t *get_hwcaps(void)
caps.display_xres = 16;
#endif
#if BOXMODEL_UFS912
initialized = 1;
strcpy(caps.boxvendor, "KATHREIN");
strcpy(caps.boxname, "UFS912");
strcpy(caps.boxarch, "STX7111");
@@ -68,7 +66,6 @@ hw_caps_t *get_hwcaps(void)
caps.display_xres = 16;
#endif
#if BOXMODEL_UFS913
initialized = 1;
strcpy(caps.boxvendor, "KATHREIN");
strcpy(caps.boxname, "UFS913");
strcpy(caps.boxarch, "STX7105");
@@ -86,7 +83,6 @@ hw_caps_t *get_hwcaps(void)
caps.display_xres = 16;
#endif
#if BOXMODEL_UFS922
initialized = 1;
strcpy(caps.boxvendor, "KATHREIN");
strcpy(caps.boxname, "UFS922");
strcpy(caps.boxarch, "STX7109");
@@ -103,7 +99,6 @@ hw_caps_t *get_hwcaps(void)
caps.display_xres = 16;
#endif
#if BOXMODEL_ATEVIO7500
initialized = 1;
strcpy(caps.boxvendor, "DUCKBOX");
strcpy(caps.boxname, "ATEVIO7500");
strcpy(caps.boxarch, "STX7105");
@@ -121,7 +116,6 @@ hw_caps_t *get_hwcaps(void)
caps.display_xres = 12;
#endif
#if BOXMODEL_FORTIS_HDBOX
initialized = 1;
strcpy(caps.boxvendor, "DUCKBOX");
strcpy(caps.boxname, "HDBOX");
strcpy(caps.boxarch, "STX7109");
@@ -139,7 +133,6 @@ hw_caps_t *get_hwcaps(void)
caps.display_xres = 12;
#endif
#if BOXMODEL_OCTAGON1008
initialized = 1;
strcpy(caps.boxvendor, "DUCKBOX");
strcpy(caps.boxname, "OCTAGON1008");
strcpy(caps.boxarch, "STX7109");
@@ -156,7 +149,6 @@ hw_caps_t *get_hwcaps(void)
caps.display_xres = 8;
#endif
#if BOXMODEL_CUBEREVO
initialized = 1;
strcpy(caps.boxvendor, "DUCKBOX");
strcpy(caps.boxname, "CUBEREVO");
strcpy(caps.boxarch, "STX7109");
@@ -171,7 +163,6 @@ hw_caps_t *get_hwcaps(void)
caps.has_CI = 2;
#endif
#if BOXMODEL_CUBEREVO_MINI
initialized = 1;
strcpy(caps.boxvendor, "DUCKBOX");
strcpy(caps.boxname, "CUBEREVO-MINI");
strcpy(caps.boxarch, "STX7109");
@@ -186,7 +177,6 @@ hw_caps_t *get_hwcaps(void)
caps.has_CI = 2;
#endif
#if BOXMODEL_CUBEREVO_MINI2
initialized = 1;
strcpy(caps.boxvendor, "DUCKBOX");
strcpy(caps.boxname, "CUBEREVO-MINI2");
strcpy(caps.boxarch, "STX7109");
@@ -203,7 +193,6 @@ hw_caps_t *get_hwcaps(void)
caps.display_xres = 14;
#endif
#if BOXMODEL_CUBEREVO_250HD
initialized = 1;
strcpy(caps.boxvendor, "DUCKBOX");
strcpy(caps.boxname, "CUBEREVO-250HD");
strcpy(caps.boxarch, "STX7109");
@@ -218,7 +207,6 @@ hw_caps_t *get_hwcaps(void)
caps.has_CI = 0;
#endif
#if BOXMODEL_CUBEREVO_2000HD
initialized = 1;
strcpy(caps.boxvendor, "DUCKBOX");
strcpy(caps.boxname, "CUBEREVO-2000HD");
strcpy(caps.boxarch, "STX7109");
@@ -233,7 +221,6 @@ hw_caps_t *get_hwcaps(void)
caps.has_CI = 0;
#endif
#if BOXMODEL_CUBEREVO_3000HD
initialized = 1;
strcpy(caps.boxvendor, "DUCKBOX");
strcpy(caps.boxname, "CUBEREVO-3000HD");
strcpy(caps.boxarch, "STX7109");
@@ -248,7 +235,6 @@ hw_caps_t *get_hwcaps(void)
caps.has_CI = 2;
#endif
#if BOXMODEL_IPBOX9900
initialized = 1;
strcpy(caps.boxvendor, "DUCKBOX");
strcpy(caps.boxname, "IPBOX9900");
strcpy(caps.boxarch, "STX7109");
@@ -263,7 +249,6 @@ hw_caps_t *get_hwcaps(void)
caps.has_CI = 2;
#endif
#if BOXMODEL_IPBOX99
initialized = 1;
strcpy(caps.boxvendor, "DUCKBOX");
strcpy(caps.boxname, "IPBOX99");
strcpy(caps.boxarch, "STX7109");
@@ -278,7 +263,6 @@ hw_caps_t *get_hwcaps(void)
caps.has_CI = 0;
#endif
#if BOXMODEL_IPBOX55
initialized = 1;
strcpy(caps.boxvendor, "DUCKBOX");
strcpy(caps.boxname, "IPBOX55");
strcpy(caps.boxarch, "STX7109");
@@ -293,7 +277,6 @@ hw_caps_t *get_hwcaps(void)
caps.has_CI = 0;
#endif
#if BOXMODEL_TF7700
initialized = 1;
strcpy(caps.boxvendor, "DUCKBOX");
strcpy(caps.boxname, "TF7700");
strcpy(caps.boxarch, "STX7109");
@@ -307,5 +290,7 @@ hw_caps_t *get_hwcaps(void)
caps.has_fan = 0;
caps.has_CI = 2;
#endif
initialized = 1;
return &caps;
}

View File

@@ -32,7 +32,6 @@ hw_caps_t *get_hwcaps(void)
else
caps.can_pip = 0;
initialized = 1;
caps.can_cpufreq = 0;
caps.can_shutdown = 1; /* for testing */
caps.display_type = HW_DISPLAY_LINE_TEXT;
@@ -53,5 +52,6 @@ hw_caps_t *get_hwcaps(void)
else
fprintf(stderr, "%s: uname() failed: %m\n", __func__);
initialized = 1;
return &caps;
}

View File

@@ -35,7 +35,6 @@ hw_caps_t *get_hwcaps(void)
caps.can_pip = 0;
#if BOXMODEL_VUDUO
initialized = 1;
caps.has_CI = 2;
caps.can_cec = 1;
caps.can_cpufreq = 0;
@@ -56,5 +55,7 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxname, "DUO");
strcpy(caps.boxarch, "BCM7335");
#endif
initialized = 1;
return &caps;
}

View File

@@ -30,7 +30,6 @@ hw_caps_t *get_hwcaps(void)
else
caps.can_pip = 0;
initialized = 1;
caps.can_cpufreq = 0;
caps.can_shutdown = 1; /* for testing */
caps.display_type = HW_DISPLAY_LINE_TEXT;
@@ -42,5 +41,6 @@ hw_caps_t *get_hwcaps(void)
strcpy(caps.boxvendor, "Raspberry");
strcpy(caps.boxname, "Pi");
initialized = 1;
return &caps;
}

View File

@@ -34,7 +34,6 @@ hw_caps_t *get_hwcaps(void)
else
caps.can_pip = 0;
initialized = 1;
caps.has_CI = 0;
caps.can_cec = 1;
caps.can_cpufreq = 1;
@@ -178,5 +177,7 @@ hw_caps_t *get_hwcaps(void)
tmp = "(NO STB_ID FOUND)";
strcpy(caps.boxname, tmp);
}
initialized = 1;
return &caps;
}