media: atomisp: runtime: frame: remove #ifdef ISP2401
authorKate Hsuan <hpa@redhat.com>
Mon, 8 May 2023 06:26:29 +0000 (07:26 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 9 Jun 2023 13:22:42 +0000 (14:22 +0100)
The actions of ISP2401 and 2400 are determined at the runtime.

Link: https://lore.kernel.org/r/20230508062632.34537-2-hpa@redhat.com
Signed-off-by: Kate Hsuan <hpa@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c

index 83bb42e..1e374ae 100644 (file)
@@ -601,9 +601,6 @@ static void frame_init_qplane6_planes(struct ia_css_frame *frame)
 
 static int frame_allocate_buffer_data(struct ia_css_frame *frame)
 {
-#ifdef ISP2401
-       IA_CSS_ENTER_LEAVE_PRIVATE("frame->data_bytes=%d\n", frame->data_bytes);
-#endif
        frame->data = hmm_alloc(frame->data_bytes);
        if (frame->data == mmgr_NULL)
                return -ENOMEM;
@@ -635,15 +632,11 @@ static int frame_allocate_with_data(struct ia_css_frame **frame,
 
        if (err) {
                kvfree(me);
-#ifndef ISP2401
-               return err;
-#else
-               me = NULL;
-#endif
+               *frame = NULL;
+       } else {
+               *frame = me;
        }
 
-       *frame = me;
-
        return err;
 }