]> git.baikalelectronics.ru Git - kernel.git/commit
device property: Introduce fwnode_call_bool_op() for ops that return bool
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 11 Jul 2017 15:20:20 +0000 (18:20 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 12 Jul 2017 11:32:46 +0000 (13:32 +0200)
commitc7d53a05374d59f8be123074c980eccfa3157455
treeccec68fe1452a4df5f30da226623aa6dc5e9e7ec
parent8438033c1b4a8a1e4ef828ac1630524ef850b82f
device property: Introduce fwnode_call_bool_op() for ops that return bool

fwnode_call_int_op() isn't suitable for calling ops that return bool
since it effectively causes the result returned to the user to be
true when an op hasn't been defined or the fwnode is NULL.

Address this by introducing fwnode_call_bool_op() for calling ops
that return bool.

Fixes: 4f08cd1ca852 "device property: Move FW type specific functionality to FW specific files"
Fixes: c919e68e5787 "device property: Introduce fwnode_device_is_available()"
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/property.c
include/linux/fwnode.h