Re: [PATCH] staging: media: atomisp: fix build error

2017-03-23 Thread Alan Cox
On Thu, 2017-03-23 at 21:12 +0800, Geliang Tang wrote:
> Fix the following build error:
> 
>   CC  drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.o
> drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c:52:2:
>  error: excess elements in array initializer [-Werror]
>   "i", /* ion */
>   ^~~

NAK

I've sent a patch to sort this out properly we shouldn't be using
string arrays for single char values to start with...

Alan



Re: [PATCH] staging: media: atomisp: fix build error

2017-03-23 Thread Alan Cox
On Thu, 2017-03-23 at 21:12 +0800, Geliang Tang wrote:
> Fix the following build error:
> 
>   CC  drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.o
> drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c:52:2:
>  error: excess elements in array initializer [-Werror]
>   "i", /* ion */
>   ^~~

NAK

I've sent a patch to sort this out properly we shouldn't be using
string arrays for single char values to start with...

Alan



[PATCH] staging: media: atomisp: fix build error

2017-03-23 Thread Geliang Tang
Fix the following build error:

  CC  drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.o
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c:52:2:
 error: excess elements in array initializer [-Werror]
  "i", /* ion */
  ^~~
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c:52:2:
 note: (near initialization for ‘hmm_bo_type_strings’)
cc1: all warnings being treated as errors
scripts/Makefile.build:294: recipe for target
'drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.o' failed

Signed-off-by: Geliang Tang 
---
 drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c 
b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c
index a362b49..e78f02f 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c
@@ -49,7 +49,9 @@ const char *hmm_bo_type_strings[HMM_BO_LAST] = {
"p", /* private */
"s", /* shared */
"u", /* user */
+#ifdef CONFIG_ION
"i", /* ion */
+#endif
 };
 
 static ssize_t bo_show(struct device *dev, struct device_attribute *attr,
-- 
2.9.3



[PATCH] staging: media: atomisp: fix build error

2017-03-23 Thread Geliang Tang
Fix the following build error:

  CC  drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.o
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c:52:2:
 error: excess elements in array initializer [-Werror]
  "i", /* ion */
  ^~~
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c:52:2:
 note: (near initialization for ‘hmm_bo_type_strings’)
cc1: all warnings being treated as errors
scripts/Makefile.build:294: recipe for target
'drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.o' failed

Signed-off-by: Geliang Tang 
---
 drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c 
b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c
index a362b49..e78f02f 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c
@@ -49,7 +49,9 @@ const char *hmm_bo_type_strings[HMM_BO_LAST] = {
"p", /* private */
"s", /* shared */
"u", /* user */
+#ifdef CONFIG_ION
"i", /* ion */
+#endif
 };
 
 static ssize_t bo_show(struct device *dev, struct device_attribute *attr,
-- 
2.9.3



[PATCH] staging: media: atomisp: fix build error in ov5693 driver

2017-03-14 Thread Tobias Regnery
The ov5693 driver unconditionally uses the entity member of struct v4l2_subdev.
However this member is conditionally compiled in if CONFIG_MEDIA_CONTROLLER is
set. This results in the following build error if CONFIG_MEDIA_CONTROLLER is
not set:

drivers/staging/media/atomisp/i2c/ov5693/ov5693.c: In function 'ov5693_remove':
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:1961:31: error: 'struct 
v4l2_subdev' has no member named 'entity'
  media_entity_cleanup(>sd.entity);

drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:2023:9: error: 'struct 
v4l2_subdev' has no member named 'entity'
  dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
 ^
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:2045:39: error: 'struct 
v4l2_subdev' has no member named 'entity'
  ret = media_entity_pads_init(>sd.entity, 1, >pad);

Add the corresponding Kconfig dependency to solve this error.

Signed-off-by: Tobias Regnery 
---
This is against next-20170310

 drivers/staging/media/atomisp/i2c/ov5693/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/i2c/ov5693/Kconfig 
b/drivers/staging/media/atomisp/i2c/ov5693/Kconfig
index 9fb1bffbe9b3..3954b8c65fd1 100644
--- a/drivers/staging/media/atomisp/i2c/ov5693/Kconfig
+++ b/drivers/staging/media/atomisp/i2c/ov5693/Kconfig
@@ -1,6 +1,6 @@
 config VIDEO_OV5693
tristate "Omnivision ov5693 sensor support"
-   depends on I2C && VIDEO_V4L2
+   depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER
---help---
  This is a Video4Linux2 sensor-level driver for the Micron
  ov5693 5 Mpixel camera.
-- 
2.11.0



[PATCH] staging: media: atomisp: fix build error in ov5693 driver

2017-03-14 Thread Tobias Regnery
The ov5693 driver unconditionally uses the entity member of struct v4l2_subdev.
However this member is conditionally compiled in if CONFIG_MEDIA_CONTROLLER is
set. This results in the following build error if CONFIG_MEDIA_CONTROLLER is
not set:

drivers/staging/media/atomisp/i2c/ov5693/ov5693.c: In function 'ov5693_remove':
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:1961:31: error: 'struct 
v4l2_subdev' has no member named 'entity'
  media_entity_cleanup(>sd.entity);

drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:2023:9: error: 'struct 
v4l2_subdev' has no member named 'entity'
  dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
 ^
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:2045:39: error: 'struct 
v4l2_subdev' has no member named 'entity'
  ret = media_entity_pads_init(>sd.entity, 1, >pad);

Add the corresponding Kconfig dependency to solve this error.

Signed-off-by: Tobias Regnery 
---
This is against next-20170310

 drivers/staging/media/atomisp/i2c/ov5693/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/i2c/ov5693/Kconfig 
b/drivers/staging/media/atomisp/i2c/ov5693/Kconfig
index 9fb1bffbe9b3..3954b8c65fd1 100644
--- a/drivers/staging/media/atomisp/i2c/ov5693/Kconfig
+++ b/drivers/staging/media/atomisp/i2c/ov5693/Kconfig
@@ -1,6 +1,6 @@
 config VIDEO_OV5693
tristate "Omnivision ov5693 sensor support"
-   depends on I2C && VIDEO_V4L2
+   depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER
---help---
  This is a Video4Linux2 sensor-level driver for the Micron
  ov5693 5 Mpixel camera.
-- 
2.11.0