thunderbolt: Refactor and fix parsing of port drom entries
authorLukas Wunner <lukas@wunner.de>
Tue, 6 Jun 2017 12:25:04 +0000 (15:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2017 09:42:42 +0000 (11:42 +0200)
commit02b17a41ad102934a3772ffc82f345345c232ee4
tree450c50597bdf621d2ad82556b92de67bae46ad55
parent390229455535d75a9bdd19437054413d677fc7b0
thunderbolt: Refactor and fix parsing of port drom entries

Currently tb_drom_parse_entry() is only able to parse drom entries of
type TB_DROM_ENTRY_PORT. Rename it to tb_drom_parse_entry_port().
Fold tb_drom_parse_port_entry() into it.

Its return value is currently ignored. Evaluate it and abort parsing on
error.

Change tb_drom_parse_entries() to accommodate for parsing of other entry
types than TB_DROM_ENTRY_PORT.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/eeprom.c