@@ -1456,19 +1456,21 @@ int dev_tree_validate(struct dt_table *table, unsigned int page_size, uint32_t *
14561456static bool is_stock_match (struct dt_entry * cur_dt_entry )
14571457{
14581458 // Stock Motorola devices use a different way to match the DTB.
1459+ #if WITH_LK2ND_DEVICE
14591460 {
14601461 extern const uint32_t mmi_prod_id ;
14611462 extern const struct mmi_unit_info * mmi_unit_info ;
14621463
14631464 if (mmi_unit_info != NULL && mmi_prod_id != 0 ) {
14641465 if (cur_dt_entry ) {
1465- if (cur_dt_entry -> variant_id == mmi_prod_id &&
1466+ if (cur_dt_entry -> variant_id == mmi_prod_id &&
14661467 cur_dt_entry -> board_hw_subtype == mmi_unit_info -> system_rev ) {
14671468 return true;
1468- }
1469- }
1469+ }
1470+ }
14701471 }
14711472 }
1473+ #endif
14721474 return false;
14731475}
14741476
@@ -1524,15 +1526,15 @@ static int platform_dt_absolute_match(struct dt_entry *cur_dt_entry, struct dt_e
15241526 (cur_dt_hw_subtype == board_hardware_subtype ()) &&
15251527 (cur_dt_hlos_ddr == (target_get_hlos_subtype () & 0x700 )) &&
15261528 ((cur_dt_entry -> variant_id & 0x00ffff00 ) <= (board_target_id () & 0x00ffff00 )))) &&
1527- !is_stock_match (cur_dt_entry ))
1529+ !is_stock_match (cur_dt_entry ))
15281530 return 0 ;
15291531 if ((
15301532 (cur_dt_entry -> soc_rev <= board_soc_version ()) &&
15311533 ((cur_dt_entry -> pmic_rev [0 ] & 0x00ffff00 ) <= (board_pmic_target (0 ) & 0x00ffff00 )) &&
15321534 ((cur_dt_entry -> pmic_rev [1 ] & 0x00ffff00 ) <= (board_pmic_target (1 ) & 0x00ffff00 )) &&
15331535 ((cur_dt_entry -> pmic_rev [2 ] & 0x00ffff00 ) <= (board_pmic_target (2 ) & 0x00ffff00 )) &&
15341536 ((cur_dt_entry -> pmic_rev [3 ] & 0x00ffff00 ) <= (board_pmic_target (3 ) & 0x00ffff00 ))) ||
1535- is_stock_match (cur_dt_entry )) {
1537+ is_stock_match (cur_dt_entry )) {
15361538
15371539#if WITH_LK2ND_DEVICE
15381540 if (!dt_list )
0 commit comments