]> asedeno.scripts.mit.edu Git - linux.git/commit
media: v4l: fwnode: Only zero the struct if bus type is set to V4L2_MBUS_UNKNOWN
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 31 Jul 2018 09:21:53 +0000 (05:21 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 4 Oct 2018 20:21:02 +0000 (16:21 -0400)
commit9a5b4b76f3be34980571d11dce509a564c938318
tree48d14c57aa832c1b2a341b1c7c01c97e62a008fe
parent60359a28d59278e2a9e7558c15dc7be518d9beb8
media: v4l: fwnode: Only zero the struct if bus type is set to V4L2_MBUS_UNKNOWN

In order to prepare for allowing drivers to set the defaults for a given
bus, make zeroing the struct conditional based on detecting the bus.
All callers now set the bus type to zero which allows only zeroing the
remaining bus union.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/v4l2-fwnode.c