fsl: serdes: ensure accessing the initialized maps of serdes protocol
Up to now, the function is_serdes_configed() doesn't check if the map of serdes protocol is initialized before accessing it. The function is_serdes_configed() will get wrong result when it was called before the serdes protocol maps initialized. As the first element of the map isn't used for any device, so use it as the flag to indicate if the map has been initialized. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
This commit is contained in:
@@ -10,6 +10,10 @@
|
||||
#include <config.h>
|
||||
|
||||
enum srds_prtcl {
|
||||
/*
|
||||
* Nobody will check whether the device 'NONE' has been configured,
|
||||
* So use it to indicate if the serdes_prtcl_map has been initialized.
|
||||
*/
|
||||
NONE = 0,
|
||||
PCIE1,
|
||||
PCIE2,
|
||||
|
||||
Reference in New Issue
Block a user