OSDN Git Service

media: atomisp: get rid of ia_css_stream_load()
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 19:35:02 +0000 (19:35 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 16 Nov 2021 14:37:10 +0000 (14:37 +0000)
This function is marked as obsolete and nobody calls it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/ia_css_stream_public.h
drivers/staging/media/atomisp/pci/sh_css.c

index 83846e4..649f22b 100644 (file)
@@ -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.
index 6f1dca0..c73ef67 100644 (file)
@@ -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)
 {