mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Reference in a new issue