scsi: ufs: ufshcd-pltfrm: Use of_property_count_u32_elems() to get property length
authorRob Herring (Arm) <robh@kernel.org>
Thu, 8 Aug 2024 17:07:03 +0000 (11:07 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 12 Aug 2024 22:17:43 +0000 (18:17 -0400)
commiteab0dce11dd91410204aae39d33124d9c16ab5f0
tree6ed8641519e0e26af66dc991c8b6f1f86110e275
parentfd9cb9615fca4fa322a43eeecbd71d4de1ba146a
scsi: ufs: ufshcd-pltfrm: Use of_property_count_u32_elems() to get property length

Replace of_get_property() with the type specific
of_property_count_u32_elems() to get the property length.

This is part of a larger effort to remove callers of of_get_property() and
similar functions. of_get_property() leaks the DT property data pointer
which is a problem for dynamically allocated nodes which may be freed.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240808170704.1438658-1-robh@kernel.org
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/host/ufshcd-pltfrm.c