device property: Move fwnode_handle_put() into property.h
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 17 Feb 2024 16:42:35 +0000 (16:42 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 25 Mar 2024 19:50:08 +0000 (19:50 +0000)
commit77fc5151f9c0e6068f1567b73d33e75a0c35333d
tree969f055d2b40c70d8c6a0fdcab8cc7917226ad91
parent4cece764965020c22cff7665b18a012006359095
device property: Move fwnode_handle_put() into property.h

By having this function as static inline in the header, the compiler
is able to see if can optmize the call out if (IS_ERR_OR_NULL(fwnode))
This will allow a simpler DEFINE_FREE() call in the following patch.

Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240217164249.921878-2-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/base/property.c
include/linux/property.h