Revert "media: subdev: Add v4l2_subdev_is_streaming()"
This reverts commit a64a102e01
which is
commit 5f3ce14fae742d1d23061c3122d93edb879ebf53 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: I1a6143299ed8fea16154f6ca0c7e223b96846e2e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -2240,31 +2240,6 @@ void v4l2_subdev_notify_event(struct v4l2_subdev *sd,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(v4l2_subdev_notify_event);
|
||||
|
||||
bool v4l2_subdev_is_streaming(struct v4l2_subdev *sd)
|
||||
{
|
||||
struct v4l2_subdev_state *state;
|
||||
|
||||
if (!v4l2_subdev_has_op(sd, pad, enable_streams))
|
||||
return sd->s_stream_enabled;
|
||||
|
||||
if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS))
|
||||
return !!sd->enabled_pads;
|
||||
|
||||
state = v4l2_subdev_get_locked_active_state(sd);
|
||||
|
||||
for (unsigned int i = 0; i < state->stream_configs.num_configs; ++i) {
|
||||
const struct v4l2_subdev_stream_config *cfg;
|
||||
|
||||
cfg = &state->stream_configs.configs[i];
|
||||
|
||||
if (cfg->enabled)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(v4l2_subdev_is_streaming);
|
||||
|
||||
int v4l2_subdev_get_privacy_led(struct v4l2_subdev *sd)
|
||||
{
|
||||
#if IS_REACHABLE(CONFIG_LEDS_CLASS)
|
||||
|
@@ -1918,17 +1918,4 @@ extern const struct v4l2_subdev_ops v4l2_subdev_call_wrappers;
|
||||
void v4l2_subdev_notify_event(struct v4l2_subdev *sd,
|
||||
const struct v4l2_event *ev);
|
||||
|
||||
/**
|
||||
* v4l2_subdev_is_streaming() - Returns if the subdevice is streaming
|
||||
* @sd: The subdevice
|
||||
*
|
||||
* v4l2_subdev_is_streaming() tells if the subdevice is currently streaming.
|
||||
* "Streaming" here means whether .s_stream() or .enable_streams() has been
|
||||
* successfully called, and the streaming has not yet been disabled.
|
||||
*
|
||||
* If the subdevice implements .enable_streams() this function must be called
|
||||
* while holding the active state lock.
|
||||
*/
|
||||
bool v4l2_subdev_is_streaming(struct v4l2_subdev *sd);
|
||||
|
||||
#endif /* _V4L2_SUBDEV_H */
|
||||
|
Reference in New Issue
Block a user