diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-07-23 22:21:54 +0300 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2019-08-06 14:45:08 +0300 |
commit | 100c12f20dfa463d52f9327b71c1806dcde82852 (patch) | |
tree | 5fe8e4936e38cc1e03a41f70ecdfc4e2867857ba /drivers/thunderbolt | |
parent | e21a712a9685488f5ce80495b37b9fdbe96c230d (diff) | |
download | linux-100c12f20dfa463d52f9327b71c1806dcde82852.tar.bz2 |
thunderbolt: Switch to use device_property_count_uXX()
Use device_property_count_uXX() directly, that makes code neater.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Yehezkel Bernat <YehezkelShB@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r-- | drivers/thunderbolt/eeprom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/eeprom.c b/drivers/thunderbolt/eeprom.c index 81e8ac4c5805..2366406e49ac 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; |