media: staging: atomisp: get rid of __KERNEL macros
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 16 Apr 2018 16:37:04 +0000 (12:37 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 16 May 2018 14:27:40 +0000 (10:27 -0400)
There's no sense for a Kernel driver to have __KERNEL macros
on it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/system_local.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/system_local.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/print_support.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c

index c1667098970213ce0c333f5765297932f63325d9..5600b32e29f4e1c536b0cf1b8ba95f4f1d8b0d82 100644 (file)
 #define HRT_ADDRESS_WIDTH      64              /* Surprise, this is a local property */
 #endif
 
-#if !defined(__KERNEL__) || (1 == 1)
 /* This interface is deprecated */
 #include "hrt/hive_types.h"
-#else  /* __KERNEL__ */
-#include <type_support.h>
-
-#if HRT_ADDRESS_WIDTH == 64
-typedef uint64_t                       hrt_address;
-#elif HRT_ADDRESS_WIDTH == 32
-typedef uint32_t                       hrt_address;
-#else
-#error "system_local.h: HRT_ADDRESS_WIDTH must be one of {32,64}"
-#endif
-
-typedef uint32_t                       hrt_vaddress;
-typedef uint32_t                       hrt_data;
-#endif /* __KERNEL__ */
 
 /*
  * Cell specific address maps
index 111b346dfafb7d37af6a0cd8924e46ba77049391..8be1cd020bf459b2df3f8785f9471e629d61d370 100644 (file)
 #define HRT_ADDRESS_WIDTH      64              /* Surprise, this is a local property */
 #endif
 
-#if !defined(__KERNEL__) || (1==1)
 /* This interface is deprecated */
 #include "hrt/hive_types.h"
-#else  /* __KERNEL__ */
-#include <linux/types.h>
-
-#if HRT_ADDRESS_WIDTH==64
-typedef uint64_t                       hrt_address;
-#elif HRT_ADDRESS_WIDTH==32
-typedef uint32_t                       hrt_address;
-#else
-#error "system_local.h: HRT_ADDRESS_WIDTH must be one of {32,64}"
-#endif
-
-typedef uint32_t                       hrt_vaddress;
-typedef uint32_t                       hrt_data;
-#endif /* __KERNEL__ */
 
 /*
  * Cell specific address maps
index 6436dae0007e1c89b4b1a5a78e9032d900a60e1e..7c52ba54fcf1760e71c8f7b4c05538b1cd7edaba 100644 (file)
@@ -15,9 +15,7 @@
 #ifndef __MATH_SUPPORT_H
 #define __MATH_SUPPORT_H
 
-#if defined(__KERNEL__)
 #include <linux/kernel.h> /* Override the definition of max/min from linux kernel*/
-#endif /*__KERNEL__*/
 
 #if defined(_MSC_VER)
 #include <stdlib.h> /* Override the definition of max/min from stdlib.h*/
@@ -216,8 +214,5 @@ static inline unsigned int ceil_pow2(unsigned int a)
 #define OP_std_modadd(base, offset, size) ((base+offset)%(size))
 #endif /* !defined(__ISP) */
 
-#if !defined(__KERNEL__)
-#define clamp(a, min_val, max_val) MIN(MAX((a), (min_val)), (max_val))
-#endif /* !defined(__KERNEL__) */
 
 #endif /* __MATH_SUPPORT_H */
index ca0fbbb577880d8726c1f4af8b9e8345fe75a407..37e8116b74a4d7438fb79fac0650c34e3b6ae640 100644 (file)
@@ -17,9 +17,6 @@
 
 
 #include <stdarg.h>
-#if !defined(__KERNEL__)
-#include <stdio.h>
-#endif
 
 extern int (*sh_css_printf) (const char *fmt, va_list args);
 /* depends on host supplied print function in ia_css_init() */
index 85263725540d4f7a5ecb64421df390218dff7179..cdbe914787c88cbca79e6efd6be8a3a7612b4471 100644 (file)
@@ -1592,10 +1592,6 @@ ia_css_pipe_set_irq_mask(struct ia_css_pipe *pipe,
         * - compare with (uint16_t)~0 or 0xffff
         * - different assert for Linux and Windows
         */
-#ifndef __KERNEL__
-       assert(or_mask <= UINT16_MAX);
-       assert(and_mask <= UINT16_MAX);
-#endif
 
        (void)HIVE_ADDR_host_sp_com; /* Suppres warnings in CRUN */