media: device property: Return true in fwnode_device_is_available for NULL ops
authorDaniel Scally <djrscally@gmail.com>
Thu, 7 Jan 2021 13:28:26 +0000 (14:28 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 26 Jan 2021 18:21:34 +0000 (19:21 +0100)
commit5273382d03763277aaf8c6a2d6088e2afaee0cf0
tree4215f43bb6fe0154f665400907d2ad6270f7600d
parentec9ded4fa864b1eeafb496902b014f5d5dd52994
media: device property: Return true in fwnode_device_is_available for NULL ops

Some types of fwnode_handle do not implement the device_is_available()
check, such as those created by software_nodes. There isn't really a
meaningful way to check for the availability of a device that doesn't
actually exist, so if the check isn't implemented just assume that the
"device" is present.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/base/property.c