Commit 802dfce3 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

media: atomisp: get rid of ia_css_stream_load()



This function is marked as obsolete and nobody calls it.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 0a9e6351
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -202,15 +202,6 @@ int
ia_css_stream_get_info(const struct ia_css_stream *stream,
		       struct ia_css_stream_info *stream_info);

/* @brief load (rebuild) a stream that was unloaded.
 * @param[in]	stream The stream
 * @return		0 or the error code
 *
 * Rebuild a stream, including allocating structs, setting configuration and
 * building the required pipes.
 */
int
ia_css_stream_load(struct ia_css_stream *stream);

/* @brief Starts the stream.
 * @param[in]	stream The stream.
+0 −52
Original line number Diff line number Diff line
@@ -9546,58 +9546,6 @@ ia_css_stream_get_info(const struct ia_css_stream *stream,
	return 0;
}

/*
 * Rebuild a stream, including allocating structs, setting configuration and
 * building the required pipes.
 * The data is taken from the css_save struct updated upon stream creation.
 * The stream handle is used to identify the correct entry in the css_save struct
 */
int
ia_css_stream_load(struct ia_css_stream *stream)
{
	int i, j, err;

	if (IS_ISP2401) {
		/* TODO remove function - DEPRECATED */
		(void)stream;
		return -ENOTSUPP;
	}

	assert(stream);
	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,	"ia_css_stream_load() enter,\n");
	for (i = 0; i < MAX_ACTIVE_STREAMS; i++) {
		if (my_css_save.stream_seeds[i].stream != stream)
			continue;

		for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++) {
			int k;

			err = ia_css_pipe_create(&my_css_save.stream_seeds[i].pipe_config[j],
						 &my_css_save.stream_seeds[i].pipes[j]);
			if (!err)
				continue;

			for (k = 0; k < j; k++)
				ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[k]);
			return err;
		}
		err = ia_css_stream_create(&my_css_save.stream_seeds[i].stream_config,
					   my_css_save.stream_seeds[i].num_pipes,
					   my_css_save.stream_seeds[i].pipes,
					   &my_css_save.stream_seeds[i].stream);
		if (!err)
			break;

		ia_css_stream_destroy(stream);
		for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++)
			ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[j]);
		return err;
	}

	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,	"ia_css_stream_load() exit,\n");
	return 0;
}

int
ia_css_stream_start(struct ia_css_stream *stream)
{