board: phytec: imx8m_som_detection: change phytec_imx8m_detect return type

phytec_imx8m_detect returns -1 on error, but the return type is u8
leading to 255 return values. Fix this by changing the return type to
int; there is no reason to keep it as u8 .

Signed-off-by: Yannic Moog <y.moog@phytec.de>
This commit is contained in:
Yannic Moog
2023-12-20 09:45:32 +01:00
committed by Fabio Estevam
parent cd3387f132
commit e2be177c85
2 changed files with 3 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ extern struct phytec_eeprom_data eeprom_data;
*
* Returns 0 in case it's a known SoM. Otherwise, returns -1.
*/
u8 __maybe_unused phytec_imx8m_detect(struct phytec_eeprom_data *data)
int __maybe_unused phytec_imx8m_detect(struct phytec_eeprom_data *data)
{
char *opt;
u8 som;

View File

@@ -15,7 +15,7 @@
#if IS_ENABLED(CONFIG_PHYTEC_IMX8M_SOM_DETECTION)
u8 __maybe_unused phytec_imx8m_detect(struct phytec_eeprom_data *data);
int __maybe_unused phytec_imx8m_detect(struct phytec_eeprom_data *data);
u8 __maybe_unused phytec_get_imx8m_ddr_size(struct phytec_eeprom_data *data);
u8 __maybe_unused phytec_get_imx8mp_rtc(struct phytec_eeprom_data *data);
u8 __maybe_unused phytec_get_imx8m_spi(struct phytec_eeprom_data *data);
@@ -23,7 +23,7 @@ u8 __maybe_unused phytec_get_imx8m_eth(struct phytec_eeprom_data *data);
#else
inline u8 __maybe_unused phytec_imx8m_detect(struct phytec_eeprom_data *data)
inline int __maybe_unused phytec_imx8m_detect(struct phytec_eeprom_data *data)
{
return -1;
}