From fdb6c3cb27dc94fc0020095faf4dc5a82770bea0 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 30 Dec 2020 15:37:17 +0100 Subject: [PATCH] Revert "media: v4l2-fwnode: Return -EINVAL for invalid bus-type" This reverts commit 2c06ac46f81c20b4860405e3c6daaa715d975aec which is commit 69baf338fc16a4d55c78da8874ce3f06feb38c78 upstream. It's not really an ABI break, but it is a genksyms break. It's a trivial issue this commit is referencing and not work the hack of a work-around to keep it in here, so just revert the thing. Bug: 161946584 Signed-off-by: Greg Kroah-Hartman Change-Id: Ie774efb3a30031bbc2b2ca85c398b87d7d065e8e --- drivers/media/v4l2-core/v4l2-fwnode.c | 6 +----- include/media/v4l2-mediabus.h | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c index 48c3b9f72722a..3bd1888787eb3 100644 --- a/drivers/media/v4l2-core/v4l2-fwnode.c +++ b/drivers/media/v4l2-core/v4l2-fwnode.c @@ -93,7 +93,7 @@ v4l2_fwnode_bus_type_to_mbus(enum v4l2_fwnode_bus_type type) const struct v4l2_fwnode_bus_conv *conv = get_v4l2_fwnode_bus_conv_by_fwnode_bus(type); - return conv ? conv->mbus_type : V4L2_MBUS_INVALID; + return conv ? conv->mbus_type : V4L2_MBUS_UNKNOWN; } static const char * @@ -436,10 +436,6 @@ static int __v4l2_fwnode_endpoint_parse(struct fwnode_handle *fwnode, v4l2_fwnode_mbus_type_to_string(vep->bus_type), vep->bus_type); mbus_type = v4l2_fwnode_bus_type_to_mbus(bus_type); - if (mbus_type == V4L2_MBUS_INVALID) { - pr_debug("unsupported bus type %u\n", bus_type); - return -EINVAL; - } if (vep->bus_type != V4L2_MBUS_UNKNOWN) { if (mbus_type != V4L2_MBUS_UNKNOWN && diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h index c072ed1418113..45f88f0248c4e 100644 --- a/include/media/v4l2-mediabus.h +++ b/include/media/v4l2-mediabus.h @@ -78,7 +78,6 @@ * @V4L2_MBUS_CCP2: CCP2 (Compact Camera Port 2) * @V4L2_MBUS_CSI2_DPHY: MIPI CSI-2 serial interface, with D-PHY * @V4L2_MBUS_CSI2_CPHY: MIPI CSI-2 serial interface, with C-PHY - * @V4L2_MBUS_INVALID: invalid bus type (keep as last) */ enum v4l2_mbus_type { V4L2_MBUS_UNKNOWN, @@ -88,7 +87,6 @@ enum v4l2_mbus_type { V4L2_MBUS_CCP2, V4L2_MBUS_CSI2_DPHY, V4L2_MBUS_CSI2_CPHY, - V4L2_MBUS_INVALID, }; /**