mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 23:39:18 +00:00
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>
This commit is contained in:
parent
e21a712a96
commit
100c12f20d
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user