resource: Add a resource_list_first_type helper
authorRob Herring <robh@kernel.org>
Mon, 28 Oct 2019 16:32:32 +0000 (11:32 -0500)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 29 Oct 2019 10:47:14 +0000 (10:47 +0000)
commit494f8b10d832456a96be4ee7317425f6936cabc8
treedb7af0599f5312da9742f5c8875d17162c7d2719
parent54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c
resource: Add a resource_list_first_type helper

A common pattern is looping over a resource_list just to get a matching
entry with a specific type. Add resource_list_first_type() helper which
implements this.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
include/linux/resource_ext.h