From: Andy Shevchenko Date: Tue, 23 Jul 2019 19:21:54 +0000 (+0300) Subject: thunderbolt: Switch to use device_property_count_uXX() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=100c12f20dfa463d52f9327b71c1806dcde82852;p=linux.git thunderbolt: Switch to use device_property_count_uXX() Use device_property_count_uXX() directly, that makes code neater. Signed-off-by: Andy Shevchenko Acked-by: Yehezkel Bernat Signed-off-by: Mika Westerberg --- diff --git a/drivers/thunderbolt/eeprom.c b/drivers/thunderbolt/eeprom.c index 81e8ac4c5805b..2366406e49acc 100644 --- a/drivers/thunderbolt/eeprom.c +++ b/drivers/thunderbolt/eeprom.c @@ -414,7 +414,7 @@ static int tb_drom_copy_efi(struct tb_switch *sw, u16 *size) struct device *dev = &sw->tb->nhi->pdev->dev; int len, res; - len = device_property_read_u8_array(dev, "ThunderboltDROM", NULL, 0); + len = device_property_count_u8(dev, "ThunderboltDROM"); if (len < 0 || len < sizeof(struct tb_drom_header)) return -EINVAL;