[PATCH] [media] staging: omap4iss: make v4l2_file_operations const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only stored in a const field of a
video_device structure.

Signed-off-by: Bhumika Goyal 
---
 drivers/staging/media/omap4iss/iss_video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/omap4iss/iss_video.c 
b/drivers/staging/media/omap4iss/iss_video.c
index 0bac582..9e2f042 100644
--- a/drivers/staging/media/omap4iss/iss_video.c
+++ b/drivers/staging/media/omap4iss/iss_video.c
@@ -1199,7 +1199,7 @@ static int iss_video_mmap(struct file *file, struct 
vm_area_struct *vma)
return vb2_mmap(>queue, vma);
 }
 
-static struct v4l2_file_operations iss_video_fops = {
+static const struct v4l2_file_operations iss_video_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = video_ioctl2,
.open = iss_video_open,
-- 
1.9.1



[PATCH] [media] v4l: omap3isp: make v4l2_file_operations const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only stored in a const field of a
video_device structure.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/platform/omap3isp/ispvideo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/omap3isp/ispvideo.c 
b/drivers/media/platform/omap3isp/ispvideo.c
index 218e6d7..b96f344 100644
--- a/drivers/media/platform/omap3isp/ispvideo.c
+++ b/drivers/media/platform/omap3isp/ispvideo.c
@@ -1403,7 +1403,7 @@ static int isp_video_mmap(struct file *file, struct 
vm_area_struct *vma)
return vb2_mmap(>queue, vma);
 }
 
-static struct v4l2_file_operations isp_video_fops = {
+static const struct v4l2_file_operations isp_video_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = video_ioctl2,
.open = isp_video_open,
-- 
1.9.1



[PATCH] [media] cx18: make v4l2_file_operations const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only stored in a const field of a
video_device structure.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/pci/cx18/cx18-streams.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/cx18/cx18-streams.c 
b/drivers/media/pci/cx18/cx18-streams.c
index 81d06c1..8385411 100644
--- a/drivers/media/pci/cx18/cx18-streams.c
+++ b/drivers/media/pci/cx18/cx18-streams.c
@@ -31,7 +31,7 @@
 
 #define CX18_DSP0_INTERRUPT_MASK   0xd0004C
 
-static struct v4l2_file_operations cx18_v4l2_enc_fops = {
+static const struct v4l2_file_operations cx18_v4l2_enc_fops = {
.owner = THIS_MODULE,
.read = cx18_v4l2_read,
.open = cx18_v4l2_open,
-- 
1.9.1



[PATCH] [media] usbtv: make v4l2_file_operations const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only stored in a const field of a
video_device structure.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/usb/usbtv/usbtv-video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/usbtv/usbtv-video.c 
b/drivers/media/usb/usbtv/usbtv-video.c
index 8135614..95b5f43 100644
--- a/drivers/media/usb/usbtv/usbtv-video.c
+++ b/drivers/media/usb/usbtv/usbtv-video.c
@@ -629,7 +629,7 @@ static int usbtv_s_input(struct file *file, void *priv, 
unsigned int i)
.vidioc_streamoff = vb2_ioctl_streamoff,
 };
 
-static struct v4l2_file_operations usbtv_fops = {
+static const struct v4l2_file_operations usbtv_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = video_ioctl2,
.mmap = vb2_fop_mmap,
-- 
1.9.1



[PATCH 1/2] [media] dib9000: delete some unused broken code

2017-08-26 Thread Dan Carpenter
The dib9000_remove_slave_frontend() function isn't used.

I was reviewing it because my static checker claims it writes one
element beyond the end of the array.  That's a false positive.  What it
actually does is, if there are two or more front ends, then it prints a
debug message to say that it removed the first one, stored in
state->fe[1], and then it "removes" (scare quotes on purpose) the second
one, stored in state->fe[2].  Deleting a front end from the middle is
not really supported and breaks code like dib9000_release() which
assumes the first NULL front end marks the end of the list.

Signed-off-by: Dan Carpenter 

diff --git a/drivers/media/dvb-frontends/dib9000.h 
b/drivers/media/dvb-frontends/dib9000.h
index b10a70aa7c9f..40883b41e66b 100644
--- a/drivers/media/dvb-frontends/dib9000.h
+++ b/drivers/media/dvb-frontends/dib9000.h
@@ -37,7 +37,6 @@ extern int dib9000_fw_pid_filter_ctrl(struct dvb_frontend 
*fe, u8 onoff);
 extern int dib9000_fw_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 
onoff);
 extern int dib9000_firmware_post_pll_init(struct dvb_frontend *fe);
 extern int dib9000_set_slave_frontend(struct dvb_frontend *fe, struct 
dvb_frontend *fe_slave);
-extern int dib9000_remove_slave_frontend(struct dvb_frontend *fe);
 extern struct dvb_frontend *dib9000_get_slave_frontend(struct dvb_frontend 
*fe, int slave_index);
 extern struct i2c_adapter *dib9000_get_component_bus_interface(struct 
dvb_frontend *fe);
 extern int dib9000_set_i2c_adapter(struct dvb_frontend *fe, struct i2c_adapter 
*i2c);
@@ -97,12 +96,6 @@ static inline int dib9000_set_slave_frontend(struct 
dvb_frontend *fe, struct dvb
return -ENODEV;
 }
 
-static inline int dib9000_remove_slave_frontend(struct dvb_frontend *fe)
-{
-   printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
-   return -ENODEV;
-}
-
 static inline struct dvb_frontend *dib9000_get_slave_frontend(struct 
dvb_frontend *fe, int slave_index)
 {
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
diff --git a/drivers/media/dvb-frontends/dib9000.c 
b/drivers/media/dvb-frontends/dib9000.c
index 17c6f15c7e68..1b7a4331af05 100644
--- a/drivers/media/dvb-frontends/dib9000.c
+++ b/drivers/media/dvb-frontends/dib9000.c
@@ -2462,24 +2462,6 @@ int dib9000_set_slave_frontend(struct dvb_frontend *fe, 
struct dvb_frontend *fe_
 }
 EXPORT_SYMBOL(dib9000_set_slave_frontend);
 
-int dib9000_remove_slave_frontend(struct dvb_frontend *fe)
-{
-   struct dib9000_state *state = fe->demodulator_priv;
-   u8 index_frontend = 1;
-
-   while ((index_frontend < MAX_NUMBER_OF_FRONTENDS) && 
(state->fe[index_frontend] != NULL))
-   index_frontend++;
-   if (index_frontend != 1) {
-   dprintk("remove slave fe %p (index %i)\n", 
state->fe[index_frontend - 1], index_frontend - 1);
-   state->fe[index_frontend] = NULL;
-   return 0;
-   }
-
-   dprintk("no frontend to be removed\n");
-   return -ENODEV;
-}
-EXPORT_SYMBOL(dib9000_remove_slave_frontend);
-
 struct dvb_frontend *dib9000_get_slave_frontend(struct dvb_frontend *fe, int 
slave_index)
 {
struct dib9000_state *state = fe->demodulator_priv;


[PATCH 2/2] [media] dib8000: remove some bogus dead code

2017-08-26 Thread Dan Carpenter
This function is broken.  It sets the wrong front_end to NULL.  But it's
not used, so let's just delete it.

Signed-off-by: Dan Carpenter 

diff --git a/drivers/media/dvb-frontends/dib8000.h 
b/drivers/media/dvb-frontends/dib8000.h
index 2b8b4b1656a2..75cc8e47ec8f 100644
--- a/drivers/media/dvb-frontends/dib8000.h
+++ b/drivers/media/dvb-frontends/dib8000.h
@@ -53,7 +53,6 @@ struct dib8000_ops {
enum frontend_tune_state (*get_tune_state)(struct dvb_frontend *fe);
int (*set_tune_state)(struct dvb_frontend *fe, enum frontend_tune_state 
tune_state);
int (*set_slave_frontend)(struct dvb_frontend *fe, struct dvb_frontend 
*fe_slave);
-   int (*remove_slave_frontend)(struct dvb_frontend *fe);
struct dvb_frontend *(*get_slave_frontend)(struct dvb_frontend *fe, int 
slave_index);
int (*i2c_enumeration)(struct i2c_adapter *host, int no_of_demods,
u8 default_addr, u8 first_addr, u8 is_dib8096p);
diff --git a/drivers/media/dvb-frontends/dib8000.c 
b/drivers/media/dvb-frontends/dib8000.c
index a179a3f6563d..5d9381509b07 100644
--- a/drivers/media/dvb-frontends/dib8000.c
+++ b/drivers/media/dvb-frontends/dib8000.c
@@ -4255,23 +4255,6 @@ static int dib8000_set_slave_frontend(struct 
dvb_frontend *fe, struct dvb_fronte
return -ENOMEM;
 }
 
-static int dib8000_remove_slave_frontend(struct dvb_frontend *fe)
-{
-   struct dib8000_state *state = fe->demodulator_priv;
-   u8 index_frontend = 1;
-
-   while ((index_frontend < MAX_NUMBER_OF_FRONTENDS) && 
(state->fe[index_frontend] != NULL))
-   index_frontend++;
-   if (index_frontend != 1) {
-   dprintk("remove slave fe %p (index %i)\n", 
state->fe[index_frontend-1], index_frontend-1);
-   state->fe[index_frontend] = NULL;
-   return 0;
-   }
-
-   dprintk("no frontend to be removed\n");
-   return -ENODEV;
-}
-
 static struct dvb_frontend *dib8000_get_slave_frontend(struct dvb_frontend 
*fe, int slave_index)
 {
struct dib8000_state *state = fe->demodulator_priv;
@@ -4506,7 +4489,6 @@ void *dib8000_attach(struct dib8000_ops *ops)
ops->get_slave_frontend = dib8000_get_slave_frontend;
ops->set_tune_state = dib8000_set_tune_state;
ops->pid_filter_ctrl = dib8000_pid_filter_ctrl;
-   ops->remove_slave_frontend = dib8000_remove_slave_frontend;
ops->get_adc_power = dib8000_get_adc_power;
ops->update_pll = dib8000_update_pll;
ops->tuner_sleep = dib8096p_tuner_sleep;


[PATCH 0/4] Fix problems on building documentation with Sphinx 1.6

2017-08-26 Thread Mauro Carvalho Chehab
Sphinx 1.6 changed the way tables are produced, adding some new
macros before tables that do vertical alignments. This is incompatible
with adjustbox, used by the media book, causing build to fail.

This series fix such issues and make the layout on Sphinx 1.6 acceptable.

The first patch in this series is just a minor fix: it adjust the top and
bottom margins to 1 inch, for newer Sphinx versions, just like on
Spinx 1.4;

The second patch gets rid of adjustbox at the media book and 
adjust its tables to better fit on the output layout, making it
compatible with Sphinx 1.6;

The third patch updates sphinx.rst to remove the restriction for
Sphinx 1.6.

The final patch is just a cleanup patch: it removes adjustbox dependency
from LaTeX output and stop requiring it when checking for
build system dependencies. It should only be applied after
patch 2 is merged.

Jon,

IMHO, the best is if I apply patch 2 on my trees. Please apply
patches 1 and 3 on your tree.

Patch 4 can only be applied after  patch 2 gets merged, but it
is just a cleanup patch that can be applied any time later.

Mauro Carvalho Chehab (4):
  docs-rst: fix verbatim font size on tables
  media: fix pdf build with Spinx 1.6
  sphinx.rst: Allow Sphinx version 1.6 at the docs
  docs-rst: don't require adjustbox anymore

 Documentation/conf.py  |   5 +-
 Documentation/doc-guide/sphinx.rst |   4 +-
 Documentation/media/uapi/v4l/dev-meta.rst  |   2 +
 Documentation/media/uapi/v4l/dev-sliced-vbi.rst|  23 ++-
 Documentation/media/uapi/v4l/dev-subdev.rst|   6 +-
 Documentation/media/uapi/v4l/extended-controls.rst |   6 +-
 Documentation/media/uapi/v4l/pixfmt-inzi.rst   |   7 +-
 Documentation/media/uapi/v4l/pixfmt-packed-hsv.rst |  30 ++--
 Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 186 +++--
 Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst |  50 +++---
 Documentation/media/uapi/v4l/pixfmt-srggb10p.rst   |   7 +-
 Documentation/media/uapi/v4l/subdev-formats.rst|  17 +-
 Documentation/media/uapi/v4l/vidioc-dqevent.rst|   2 +-
 .../media/uapi/v4l/vidioc-dv-timings-cap.rst   |   2 +-
 .../media/uapi/v4l/vidioc-enum-frameintervals.rst  |   2 +
 Documentation/media/uapi/v4l/vidioc-enumstd.rst|   9 +-
 .../media/uapi/v4l/vidioc-g-dv-timings.rst |   4 +-
 .../media/uapi/v4l/vidioc-g-enc-index.rst  |   2 +-
 .../media/uapi/v4l/vidioc-g-ext-ctrls.rst  |   2 +-
 .../media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst |   6 +-
 Documentation/media/uapi/v4l/vidioc-g-tuner.rst|   4 +-
 Documentation/media/uapi/v4l/vidioc-queryctrl.rst  |   2 +-
 scripts/sphinx-pre-install |   1 -
 23 files changed, 204 insertions(+), 175 deletions(-)

-- 
2.13.3




[PATCH 2/4] media: fix pdf build with Spinx 1.6

2017-08-26 Thread Mauro Carvalho Chehab
Sphinx 1.6 generates some LaTeX code before each table,
starting its own environment before calling tabulary,
apparently to improve table layout.

The problem is that such environment is incompatible with
adjustbox. While, in thesis, it should be possible to override
it or to redefine tabulary, I was unable to produce such patch.

Also, that would likely break on some future Sphinx version.

So, instead, let's just change the font size on bigger tables,
in order for them to fit into the page size. That is not as
good as adjustbox, and require some manual work, but it should
be less sensitive to Sphinx changes.

While here, adjust a few other tables whose text is exceeding
the cell boundaries.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/v4l/dev-meta.rst  |   2 +
 Documentation/media/uapi/v4l/dev-sliced-vbi.rst|  23 ++-
 Documentation/media/uapi/v4l/dev-subdev.rst|   6 +-
 Documentation/media/uapi/v4l/extended-controls.rst |   6 +-
 Documentation/media/uapi/v4l/pixfmt-inzi.rst   |   7 +-
 Documentation/media/uapi/v4l/pixfmt-packed-hsv.rst |  30 ++--
 Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 186 +++--
 Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst |  50 +++---
 Documentation/media/uapi/v4l/pixfmt-srggb10p.rst   |   7 +-
 Documentation/media/uapi/v4l/subdev-formats.rst|  17 +-
 Documentation/media/uapi/v4l/vidioc-dqevent.rst|   2 +-
 .../media/uapi/v4l/vidioc-dv-timings-cap.rst   |   2 +-
 .../media/uapi/v4l/vidioc-enum-frameintervals.rst  |   2 +
 Documentation/media/uapi/v4l/vidioc-enumstd.rst|   9 +-
 .../media/uapi/v4l/vidioc-g-dv-timings.rst |   4 +-
 .../media/uapi/v4l/vidioc-g-enc-index.rst  |   2 +-
 .../media/uapi/v4l/vidioc-g-ext-ctrls.rst  |   2 +-
 .../media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst |   6 +-
 Documentation/media/uapi/v4l/vidioc-g-tuner.rst|   4 +-
 Documentation/media/uapi/v4l/vidioc-queryctrl.rst  |   2 +-
 20 files changed, 202 insertions(+), 167 deletions(-)

diff --git a/Documentation/media/uapi/v4l/dev-meta.rst 
b/Documentation/media/uapi/v4l/dev-meta.rst
index 62518adfe37b..f7ac8d0d3af1 100644
--- a/Documentation/media/uapi/v4l/dev-meta.rst
+++ b/Documentation/media/uapi/v4l/dev-meta.rst
@@ -42,6 +42,8 @@ the :c:type:`v4l2_format` structure to 0.
 
 .. _v4l2-meta-format:
 
+.. tabularcolumns:: |p{1.4cm}|p{2.2cm}|p{13.9cm}|
+
 .. flat-table:: struct v4l2_meta_format
 :header-rows:  0
 :stub-columns: 0
diff --git a/Documentation/media/uapi/v4l/dev-sliced-vbi.rst 
b/Documentation/media/uapi/v4l/dev-sliced-vbi.rst
index 5f6d534ea73b..23e079787270 100644
--- a/Documentation/media/uapi/v4l/dev-sliced-vbi.rst
+++ b/Documentation/media/uapi/v4l/dev-sliced-vbi.rst
@@ -105,7 +105,13 @@ which may return ``EBUSY`` can be the
 struct v4l2_sliced_vbi_format
 -
 
-.. tabularcolumns:: |p{1.0cm}|p{4.5cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|
+.. raw:: latex
+
+\begingroup
+\scriptsize
+\setlength{\tabcolsep}{2pt}
+
+.. tabularcolumns:: |p{.75cm}|p{3.3cm}|p{3.4cm}|p{3.4cm}|p{3.4cm}|
 
 .. cssclass:: longtable
 
@@ -199,6 +205,8 @@ struct v4l2_sliced_vbi_format
 
Applications and drivers must set it to zero.
 
+.. raw:: latex
+\endgroup
 
 .. _vbi-services2:
 
@@ -206,10 +214,9 @@ Sliced VBI services
 ---
 
 .. raw:: latex
+\footnotesize
 
-\begin{adjustbox}{width=\columnwidth}
-
-.. tabularcolumns:: |p{5.0cm}|p{1.4cm}|p{3.0cm}|p{2.5cm}|p{9.0cm}|
+.. tabularcolumns:: |p{4.1cm}|p{1.1cm}|p{2.4cm}|p{2.0cm}|p{7.3cm}|
 
 .. flat-table::
 :header-rows:  1
@@ -263,7 +270,7 @@ Sliced VBI services
 
 .. raw:: latex
 
-\end{adjustbox}\newline\newline
+\normalsize
 
 
 Drivers may return an ``EINVAL`` error code when applications attempt to
@@ -457,7 +464,7 @@ number).
 struct v4l2_mpeg_vbi_fmt_ivtv
 -
 
-.. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{1.0cm}|p{11.5cm}|
+.. tabularcolumns:: |p{1.0cm}|p{3.8cm}|p{1.0cm}|p{11.2cm}|
 
 .. flat-table::
 :header-rows:  0
@@ -525,7 +532,7 @@ Magic Constants for struct v4l2_mpeg_vbi_fmt_ivtv magic 
field
 structs v4l2_mpeg_vbi_itv0 and v4l2_mpeg_vbi_ITV0
 -
 
-.. tabularcolumns:: |p{4.4cm}|p{2.4cm}|p{10.7cm}|
+.. tabularcolumns:: |p{4.9cm}|p{2.4cm}|p{10.2cm}|
 
 .. flat-table::
 :header-rows:  0
@@ -574,7 +581,7 @@ structs v4l2_mpeg_vbi_itv0 and v4l2_mpeg_vbi_ITV0
 struct v4l2_mpeg_vbi_ITV0
 -
 
-.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
+.. tabularcolumns:: |p{4.9cm}|p{4.4cm}|p{8.2cm}|
 
 .. flat-table::
 :header-rows:  0
diff --git a/Documentation/media/uapi/v4l/dev-subdev.rst 
b/Documentation/media/uapi/v4l/dev-subdev.rst
index 2205a3abb2a9..d20d945803a7 100644
--- a/Documentation/media/uapi/v4l/dev-subdev.rst
+++ b/Documentation/media/uapi/v4l/dev-subdev.rst
@@ -204,9 +204,9 @@ list entity names and pad numbers).
 
 

[PATCH 3/4] sphinx.rst: Allow Sphinx version 1.6 at the docs

2017-08-26 Thread Mauro Carvalho Chehab
Now that the PDF building issues with Sphinx 1.6 got fixed,
update the documentation and scripts accordingly.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/doc-guide/sphinx.rst | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Documentation/doc-guide/sphinx.rst 
b/Documentation/doc-guide/sphinx.rst
index 8faafb9b2d86..a2417633fdd8 100644
--- a/Documentation/doc-guide/sphinx.rst
+++ b/Documentation/doc-guide/sphinx.rst
@@ -80,9 +80,7 @@ output.
 PDF and LaTeX builds
 
 
-Such builds are currently supported only with Sphinx versions 1.4 and 1.5.
-
-Currently, it is not possible to do pdf builds with Sphinx version 1.6.
+Such builds are currently supported only with Sphinx versions 1.4 and upper.
 
 For PDF and LaTeX output, you'll also need ``XeLaTeX`` version 3.14159265.
 
-- 
2.13.3



[PATCH 1/4] docs-rst: fix verbatim font size on tables

2017-08-26 Thread Mauro Carvalho Chehab
On Sphinx 1.6, fancy boxes are used for verbatim. The sphinx.sty
sets verbatim font is always \small. That causes a problem
inside tables that use smaller fonts, as it can be too big for
the box.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 9e941be37b94..f9054ab60cb1 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -345,7 +345,7 @@ if major == 1 and minor <= 4:
 latex_elements['preamble']  += '\\usepackage[margin=0.5in, top=1in, 
bottom=1in]{geometry}'
 elif major == 1 and (minor > 5 or (minor == 5 and patch >= 3)):
 latex_elements['sphinxsetup'] = 'hmargin=0.5in, vmargin=1in'
-
+latex_elements['preamble']  += '\\fvset{fontsize=auto}\n'
 
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title,
-- 
2.13.3



Re: [PATCH v2 4/4] docs-rst: Allow Sphinx version 1.6

2017-08-26 Thread Mauro Carvalho Chehab
Em Thu, 24 Aug 2017 13:29:14 -0600
Jonathan Corbet  escreveu:

> On Thu, 24 Aug 2017 13:26:28 -0600
> Jonathan Corbet  wrote:
> 
> > > - % To allow adjusting table sizes
> > > - \\usepackage{adjustbox}
> > > -
> > >   '''
> > >  }
> > 
> > So this change doesn't quite match the changelog...what's the story there?  
> 
> Indeed, with that patch applied, I get this:
> 
> ! LaTeX Error: Environment adjustbox undefined.
> 
> See the LaTeX manual or LaTeX Companion for explanation.
> Type  H   for immediate help.
>  ...  
>   
> l.4108 \begin{adjustbox}
> {width=\columnwidth}
> 
> ...so methinks something isn't quite right...

Sorry, yeah, I messed with this one. Just sent a new series of patches,
splitting it from the documentation changes.

This change (and the equivalent one at sphinx-pre-build script) is
actually a cleanup change. It can *only* be applied after the
patch that goes through the media tree.

What happens is that this patch:
media: fix pdf build with Spinx 1.6

Stops using adjustbox, with is what causes build problem on Sphinx 1.6.

I suspect that now the PDF build will be a bit more reliable, as the
"..raw: latex" blocs now only adjust font sizes and table spacing,
when needed to output large tables, but Sphinx maintainers have been
creative on finding new ways to break backward compatibility on every
new version ;-) Still, hope is the last thing to die.

Thanks,
Mauro


[PATCH 03/10] [media]: marvell-ccic: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c 
b/drivers/media/platform/marvell-ccic/mcam-core.c
index 8cac2f2..b07a251 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -1639,7 +1639,7 @@ static int mcam_v4l_release(struct file *filp)
  * This template device holds all of those v4l2 methods; we
  * clone it for specific real devices.
  */
-static struct video_device mcam_v4l_template = {
+static const struct video_device mcam_v4l_template = {
.name = "mcam",
.fops = _v4l_fops,
.ioctl_ops = _v4l_ioctl_ops,
-- 
1.9.1



[PATCH 05/10] [media]: s5p-g2d: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/platform/s5p-g2d/g2d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/s5p-g2d/g2d.c 
b/drivers/media/platform/s5p-g2d/g2d.c
index bd655b5..66aa8cf 100644
--- a/drivers/media/platform/s5p-g2d/g2d.c
+++ b/drivers/media/platform/s5p-g2d/g2d.c
@@ -602,7 +602,7 @@ static irqreturn_t g2d_isr(int irq, void *prv)
.vidioc_cropcap = vidioc_cropcap,
 };
 
-static struct video_device g2d_videodev = {
+static const struct video_device g2d_videodev = {
.name   = G2D_NAME,
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
-- 
1.9.1



[PATCH 04/10] [media] mx2-emmaprp: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/platform/mx2_emmaprp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/mx2_emmaprp.c 
b/drivers/media/platform/mx2_emmaprp.c
index 7fd209e..3493d40 100644
--- a/drivers/media/platform/mx2_emmaprp.c
+++ b/drivers/media/platform/mx2_emmaprp.c
@@ -873,7 +873,7 @@ static int emmaprp_mmap(struct file *file, struct 
vm_area_struct *vma)
.mmap   = emmaprp_mmap,
 };
 
-static struct video_device emmaprp_videodev = {
+static const struct video_device emmaprp_videodev = {
.name   = MEM2MEM_NAME,
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
-- 
1.9.1



[PATCH 02/10] [media] dt3155: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/pci/dt3155/dt3155.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/dt3155/dt3155.c 
b/drivers/media/pci/dt3155/dt3155.c
index 6a21969..1775c36 100644
--- a/drivers/media/pci/dt3155/dt3155.c
+++ b/drivers/media/pci/dt3155/dt3155.c
@@ -499,7 +499,7 @@ static int dt3155_init_board(struct dt3155_priv *pd)
return 0;
 }
 
-static struct video_device dt3155_vdev = {
+static const struct video_device dt3155_vdev = {
.name = DT3155_NAME,
.fops = _fops,
.ioctl_ops = _ioctl_ops,
-- 
1.9.1



[PATCH 10/10] [media] vim2m: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/platform/vim2m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c
index afbaa35..b01fba0 100644
--- a/drivers/media/platform/vim2m.c
+++ b/drivers/media/platform/vim2m.c
@@ -974,7 +974,7 @@ static int vim2m_release(struct file *file)
.mmap   = v4l2_m2m_fop_mmap,
 };
 
-static struct video_device vim2m_videodev = {
+static const struct video_device vim2m_videodev = {
.name   = MEM2MEM_NAME,
.vfl_dir= VFL_DIR_M2M,
.fops   = _fops,
-- 
1.9.1



[PATCH 09/10] [media] m2m-deinterlace: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/platform/m2m-deinterlace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/m2m-deinterlace.c 
b/drivers/media/platform/m2m-deinterlace.c
index 98f6db2..c8a1249 100644
--- a/drivers/media/platform/m2m-deinterlace.c
+++ b/drivers/media/platform/m2m-deinterlace.c
@@ -979,7 +979,7 @@ static int deinterlace_mmap(struct file *file, struct 
vm_area_struct *vma)
.mmap   = deinterlace_mmap,
 };
 
-static struct video_device deinterlace_videodev = {
+static const struct video_device deinterlace_videodev = {
.name   = MEM2MEM_NAME,
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
-- 
1.9.1



[PATCH 08/10] [media]: fsl-viu: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/platform/fsl-viu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c
index f7b88e5..b3b91cb 100644
--- a/drivers/media/platform/fsl-viu.c
+++ b/drivers/media/platform/fsl-viu.c
@@ -1380,7 +1380,7 @@ static int viu_mmap(struct file *file, struct 
vm_area_struct *vma)
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 };
 
-static struct video_device viu_template = {
+static const struct video_device viu_template = {
.name   = "FSL viu",
.fops   = _fops,
.minor  = -1,
-- 
1.9.1



[PATCH 07/10] [media] via-camera: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/platform/via-camera.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/via-camera.c 
b/drivers/media/platform/via-camera.c
index e16f70a..805d4a8 100644
--- a/drivers/media/platform/via-camera.c
+++ b/drivers/media/platform/via-camera.c
@@ -1259,7 +1259,7 @@ static int viacam_resume(void *priv)
  * Setup stuff.
  */
 
-static struct video_device viacam_v4l_template = {
+static const struct video_device viacam_v4l_template = {
.name   = "via-camera",
.minor  = -1,
.tvnorms= V4L2_STD_NTSC_M,
-- 
1.9.1



[PATCH 06/10] [media]: ti-vpe: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/platform/ti-vpe/cal.c | 2 +-
 drivers/media/platform/ti-vpe/vpe.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/ti-vpe/cal.c 
b/drivers/media/platform/ti-vpe/cal.c
index 0c7ddf8..42e383a 100644
--- a/drivers/media/platform/ti-vpe/cal.c
+++ b/drivers/media/platform/ti-vpe/cal.c
@@ -1420,7 +1420,7 @@ static void cal_stop_streaming(struct vb2_queue *vq)
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 };
 
-static struct video_device cal_videodev = {
+static const struct video_device cal_videodev = {
.name   = CAL_MODULE_NAME,
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
diff --git a/drivers/media/platform/ti-vpe/vpe.c 
b/drivers/media/platform/ti-vpe/vpe.c
index 2873c22..45bd105 100644
--- a/drivers/media/platform/ti-vpe/vpe.c
+++ b/drivers/media/platform/ti-vpe/vpe.c
@@ -2421,7 +2421,7 @@ static int vpe_release(struct file *file)
.mmap   = v4l2_m2m_fop_mmap,
 };
 
-static struct video_device vpe_videodev = {
+static const struct video_device vpe_videodev = {
.name   = VPE_MODULE_NAME,
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
-- 
1.9.1



Re: [PATCH v2 2/3] media: open.rst: document devnode-centric and mc-centric types

2017-08-26 Thread Mauro Carvalho Chehab
Em Fri, 25 Aug 2017 15:42:21 +0200
Hans Verkuil  escreveu:

> On 25/08/17 14:52, Mauro Carvalho Chehab wrote:
> > From: "mche...@s-opensource.com" 
> > 
> > When we added support for omap3, back in 2010, we added a new
> > type of V4L2 devices that aren't fully controlled via the V4L2
> > device node. Yet, we never made it clear, at the V4L2 spec,
> > about the differences between both types.
> > 
> > Let's document them with the current implementation.
> > 
> > Signed-off-by: Mauro Carvalho Chehab 
> > ---
> >  Documentation/media/uapi/v4l/open.rst | 53 
> > +++
> >  1 file changed, 53 insertions(+)
> > 
> > diff --git a/Documentation/media/uapi/v4l/open.rst 
> > b/Documentation/media/uapi/v4l/open.rst
> > index 9b98d10d5153..bbd1887f83a0 100644
> > --- a/Documentation/media/uapi/v4l/open.rst
> > +++ b/Documentation/media/uapi/v4l/open.rst
> > @@ -6,6 +6,59 @@
> >  Opening and Closing Devices
> >  ***
> >  
> > +Types of V4L2 hardware control
> > +==
> > +
> > +V4L2 hardware is usually complex: support for the hardware is implemented
> > +via a main driver (also known as bridge driver) and often several
> > +additional drivers. The main driver always exposes one or
> > +more **V4L2 device nodes** (see :ref:`v4l2_device_naming`).
> > +
> > +The other drivers are called **V4L2 sub-devices** and provide control to
> > +other parts of the hardware usually connected via a serial bus (like
> > +I²C, SMBus or SPI). Depending on the main driver, they can be implicitly
> > +controlled directly by the main driver or explicitly via
> > +the **V4L2 sub-device API** (see :ref:`subdev`).
> > +
> > +When V4L2 was originally designed, there was only one type of hardware
> > +control. The entire V4L2 hardware is controlled via the
> > +**V4L2 device nodes**. We refer to this kind of control as
> > +**V4L2 device node centric** (or, simply, **vdev-centric**).
> > +
> > +Since the end of 2010, a new type of V4L2 hardware control was added, in  
> 
> Just drop 'the end of'.
> 
> s/, in/ in/

I anded by changing it to:

Later (kernel 2.6.39),

> 
> > +order to support complex devices that are common for embedded systems.
> > +Those hardware are controlled mainly via the media controller and  
> 
> Such hardware is
> 
> > +sub-devices. So, they are called: **Media controller centric**
> > +(or, simply, "**MC-centric**").
> > +
> > +For **vdev-centric** hardware control, the hardware is controlled via
> > +the **V4L2 device nodes**. They may optionally support the
> > +:ref:`media controller API ` as well, in order to let
> > +the application to know with device nodes are available.  
> 
> to know with -> know which
> 
> > +
> > +.. note::
> > +
> > +   A **vdev-centric** may optionally expose V4L2 sub-devices via  
> 
> I propose adding 'also' before 'expose' to indicate that it is in
> addition to the V4L2 device nodes that were mentioned in the previous
> paragraph.
> 
> > +   :ref:`sub-device API `. In that case, it has to implement
> > +   the :ref:`media controller API ` as well.
> > +
> > +For **MC-centric** hardware control, before using the V4L2 hardware,
> > +it is required to set the pipelines via the  
> 
> I'd reword this a bit:
> 
> For **MC-centric** hardware control it is required to configure the pipelines
> via the :ref:`media controller API ` before the hardware 
> can be used.
> 
> > +:ref:`media controller API `. For those devices, the  
> 
> s/those/such/
> 
> > +sub-devices' configuration can be controlled via the
> > +:ref:`sub-device API `, whith creates one device node  
> 
> s/whith/which/
> 
> > +per sub-device.
> > +
> > +In summary, for **MC-centric** hardware control:
> > +
> > +- The **V4L2 device** node is responsible for controlling the streaming
> > +  features;
> > +- The **media controller device** is responsible to setup the pipelines;
> > +- The **V4L2 sub-devices** are responsible for sub-device
> > +  specific settings.
> > +
> > +
> > +.. _v4l2_device_naming:
> >  
> >  V4L2 Device Node Naming
> >  ===

Changes done. I'll place on a new version of this series.

> >   
> 
> The only thing I am not sure about is vdev-centric vs V4L2-centric. 'Laziness 
> while
> typing' is not a convincing argument :-)

Despite the laziness of playing a lot with shifts to type V4L2-centric,
the thing that bothers me with V4L2 is that the subdev API is part of
V4L2 spec. So, IMHO, it is still a confusing name.

As this actually refers to "V4L2 Device Node", with is now properly
specified (due to patch 1/3), "vdev" is a good shortcut for it.

Let's reverse the question: what's wrong with "vdev-centric"?

Thanks,
Mauro


[PATCH 3/3] media: serial_ir: fix tx timing calculation on 32-bit

2017-08-26 Thread Sean Young
Move the calculation to where it is needed, so the result doesn't
need to be stored in the device struct.

Signed-off-by: Sean Young 
---
 drivers/media/rc/serial_ir.c | 34 ++
 1 file changed, 14 insertions(+), 20 deletions(-)

diff --git a/drivers/media/rc/serial_ir.c b/drivers/media/rc/serial_ir.c
index 4b8d5f38baf6..8b66926bc16a 100644
--- a/drivers/media/rc/serial_ir.c
+++ b/drivers/media/rc/serial_ir.c
@@ -139,10 +139,8 @@ struct serial_ir {
struct platform_device *pdev;
struct timer_list timeout_timer;
 
-   unsigned int freq;
+   unsigned int carrier;
unsigned int duty_cycle;
-
-   unsigned int pulse_width, space_width;
 };
 
 static struct serial_ir serial_ir;
@@ -183,18 +181,6 @@ static void off(void)
soutp(UART_MCR, hardware[type].off);
 }
 
-static void init_timing_params(unsigned int new_duty_cycle,
-  unsigned int new_freq)
-{
-   serial_ir.duty_cycle = new_duty_cycle;
-   serial_ir.freq = new_freq;
-
-   serial_ir.pulse_width = DIV_ROUND_CLOSEST(
-   new_duty_cycle * NSEC_PER_SEC, new_freq * 100l);
-   serial_ir.space_width = DIV_ROUND_CLOSEST(
-   (100l - new_duty_cycle) * NSEC_PER_SEC, new_freq * 100l);
-}
-
 static void send_pulse_irdeo(unsigned int length, ktime_t target)
 {
long rawbits;
@@ -241,13 +227,20 @@ static void send_pulse_homebrew_softcarrier(unsigned int 
length, ktime_t edge)
 * ndelay(s64) does not compile; so use s32 rather than s64.
 */
s32 delta;
+   unsigned int pulse, space;
+
+   /* Ensure the dividend fits into 32 bit */
+   pulse = DIV_ROUND_CLOSEST(serial_ir.duty_cycle * (NSEC_PER_SEC / 100),
+ serial_ir.carrier);
+   space = DIV_ROUND_CLOSEST((100 - serial_ir.duty_cycle) *
+ (NSEC_PER_SEC / 100), serial_ir.carrier);
 
for (;;) {
now = ktime_get();
if (ktime_compare(now, target) >= 0)
break;
on();
-   edge = ktime_add_ns(edge, serial_ir.pulse_width);
+   edge = ktime_add_ns(edge, pulse);
delta = ktime_to_ns(ktime_sub(edge, now));
if (delta > 0)
ndelay(delta);
@@ -255,7 +248,7 @@ static void send_pulse_homebrew_softcarrier(unsigned int 
length, ktime_t edge)
off();
if (ktime_compare(now, target) >= 0)
break;
-   edge = ktime_add_ns(edge, serial_ir.space_width);
+   edge = ktime_add_ns(edge, space);
delta = ktime_to_ns(ktime_sub(edge, now));
if (delta > 0)
ndelay(delta);
@@ -580,7 +573,8 @@ static int serial_ir_probe(struct platform_device *dev)
return result;
 
/* Initialize pulse/space widths */
-   init_timing_params(50, 38000);
+   serial_ir.duty_cycle = 50;
+   serial_ir.carrier = 38000;
 
/* If pin is high, then this must be an active low receiver. */
if (sense == -1) {
@@ -684,7 +678,7 @@ static int serial_ir_tx(struct rc_dev *dev, unsigned int 
*txbuf,
 
 static int serial_ir_tx_duty_cycle(struct rc_dev *dev, u32 cycle)
 {
-   init_timing_params(cycle, serial_ir.freq);
+   serial_ir.duty_cycle = cycle;
return 0;
 }
 
@@ -693,7 +687,7 @@ static int serial_ir_tx_carrier(struct rc_dev *dev, u32 
carrier)
if (carrier > 50 || carrier < 2)
return -EINVAL;
 
-   init_timing_params(serial_ir.duty_cycle, carrier);
+   serial_ir.carrier = carrier;
return 0;
 }
 
-- 
2.13.5



[PATCH 1/3] media: rc: use ktime accessor functions

2017-08-26 Thread Sean Young
From: Jasmin Jessich 

Prefer using accessor functions so we are not dependent on the ktime_t
type.

Signed-off-by: Jasmin Jessich 
Signed-off-by: Sean Young 
---
 drivers/media/rc/rc-ir-raw.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c
index f495709e28fb..503bc425a187 100644
--- a/drivers/media/rc/rc-ir-raw.c
+++ b/drivers/media/rc/rc-ir-raw.c
@@ -106,7 +106,7 @@ int ir_raw_event_store_edge(struct rc_dev *dev, bool pulse)
return -EINVAL;
 
now = ktime_get();
-   ev.duration = ktime_sub(now, dev->raw->last_event);
+   ev.duration = ktime_to_ns(ktime_sub(now, dev->raw->last_event));
ev.pulse = !pulse;
 
rc = ir_raw_event_store(dev, );
@@ -474,18 +474,19 @@ EXPORT_SYMBOL(ir_raw_encode_scancode);
 static void edge_handle(unsigned long arg)
 {
struct rc_dev *dev = (struct rc_dev *)arg;
-   ktime_t interval = ktime_get() - dev->raw->last_event;
+   ktime_t interval = ktime_sub(ktime_get(), dev->raw->last_event);
 
-   if (interval >= dev->timeout) {
+   if (ktime_to_ns(interval) >= dev->timeout) {
DEFINE_IR_RAW_EVENT(ev);
 
ev.timeout = true;
-   ev.duration = interval;
+   ev.duration = ktime_to_ns(interval);
 
ir_raw_event_store(dev, );
} else {
mod_timer(>raw->edge_handle,
- jiffies + nsecs_to_jiffies(dev->timeout - interval));
+ jiffies + nsecs_to_jiffies(dev->timeout -
+ktime_to_ns(interval)));
}
 
ir_raw_event_handle(dev);
-- 
2.13.5



[PATCH 2/3] media: rc: gpio-ir-tx: use ktime accessor functions

2017-08-26 Thread Sean Young
Prefer using accessor functions so we are not dependent on the ktime_t
type.

Signed-off-by: Sean Young 
---
 drivers/media/rc/gpio-ir-tx.c | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/gpio-ir-tx.c b/drivers/media/rc/gpio-ir-tx.c
index 0b83408a2e18..cd476cab9782 100644
--- a/drivers/media/rc/gpio-ir-tx.c
+++ b/drivers/media/rc/gpio-ir-tx.c
@@ -98,15 +98,17 @@ static int gpio_ir_tx(struct rc_dev *dev, unsigned int 
*txbuf,
// pulse
ktime_t last = ktime_add_us(edge, txbuf[i]);
 
-   while (ktime_get() < last) {
+   while (ktime_before(ktime_get(), last)) {
gpiod_set_value(gpio_ir->gpio, 1);
-   edge += pulse;
-   delta = edge - ktime_get();
+   edge = ktime_add_ns(edge, pulse);
+   delta = ktime_to_ns(ktime_sub(edge,
+ ktime_get()));
if (delta > 0)
ndelay(delta);
gpiod_set_value(gpio_ir->gpio, 0);
-   edge += space;
-   delta = edge - ktime_get();
+   edge = ktime_add_ns(edge, space);
+   delta = ktime_to_ns(ktime_sub(edge,
+ ktime_get()));
if (delta > 0)
ndelay(delta);
}
-- 
2.13.5



[PATCH 04/11] [media] s2255drv: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/usb/s2255/s2255drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/s2255/s2255drv.c 
b/drivers/media/usb/s2255/s2255drv.c
index 23f606e..b2f239c 100644
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -1590,7 +1590,7 @@ static void s2255_video_device_release(struct 
video_device *vdev)
return;
 }
 
-static struct video_device template = {
+static const struct video_device template = {
.name = "s2255v",
.fops = _fops_v4l,
.ioctl_ops = _ioctl_ops,
-- 
1.9.1



[PATCH 02/11] [media] stkwebcam: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/usb/stkwebcam/stk-webcam.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c 
b/drivers/media/usb/stkwebcam/stk-webcam.c
index 39abb58..c0bba77 100644
--- a/drivers/media/usb/stkwebcam/stk-webcam.c
+++ b/drivers/media/usb/stkwebcam/stk-webcam.c
@@ -1244,7 +1244,7 @@ static void stk_v4l_dev_release(struct video_device *vd)
kfree(dev);
 }
 
-static struct video_device stk_v4l_data = {
+static const struct video_device stk_v4l_data = {
.name = "stkwebcam",
.fops = _stk_fops,
.ioctl_ops = _stk_ioctl_ops,
-- 
1.9.1



[PATCH 00/11] [media]: make video_device const

2017-08-26 Thread Bhumika Goyal
Make video_device const.

Bhumika Goyal (11):
  [media] zr364xx: make video_device const
  [media] stkwebcam:  make video_device const
  [media] stk1160: make video_device const
  [media] s2255drv:  make video_device const
  [media] pwc: make video_device const
  [media] pvrusb2: make video_device const
  [media] msi2500: make video_device const
  [media] hackrf:  make video_device const
  [media] go7007: make video_device const
  [media] cpia2: make video_device const
  [media] airspy: make video_device const

 drivers/media/usb/airspy/airspy.c| 2 +-
 drivers/media/usb/cpia2/cpia2_v4l.c  | 2 +-
 drivers/media/usb/go7007/go7007-v4l2.c   | 2 +-
 drivers/media/usb/hackrf/hackrf.c| 2 +-
 drivers/media/usb/msi2500/msi2500.c  | 2 +-
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 2 +-
 drivers/media/usb/pwc/pwc-if.c   | 2 +-
 drivers/media/usb/s2255/s2255drv.c   | 2 +-
 drivers/media/usb/stk1160/stk1160-v4l.c  | 2 +-
 drivers/media/usb/stkwebcam/stk-webcam.c | 2 +-
 drivers/media/usb/zr364xx/zr364xx.c  | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

-- 
1.9.1



[PATCH 03/11] [media] stk1160: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/usb/stk1160/stk1160-v4l.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/stk1160/stk1160-v4l.c 
b/drivers/media/usb/stk1160/stk1160-v4l.c
index a132faa..77b759a 100644
--- a/drivers/media/usb/stk1160/stk1160-v4l.c
+++ b/drivers/media/usb/stk1160/stk1160-v4l.c
@@ -751,7 +751,7 @@ static void stop_streaming(struct vb2_queue *vq)
.wait_finish= vb2_ops_wait_finish,
 };
 
-static struct video_device v4l_template = {
+static const struct video_device v4l_template = {
.name = "stk1160",
.tvnorms = V4L2_STD_525_60 | V4L2_STD_625_50,
.fops = _fops,
-- 
1.9.1



[PATCH 08/11] [media] hackrf: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/usb/hackrf/hackrf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/hackrf/hackrf.c 
b/drivers/media/usb/hackrf/hackrf.c
index a41b305..7eb5351 100644
--- a/drivers/media/usb/hackrf/hackrf.c
+++ b/drivers/media/usb/hackrf/hackrf.c
@@ -1263,7 +1263,7 @@ static int hackrf_enum_freq_bands(struct file *file, void 
*priv,
.unlocked_ioctl   = video_ioctl2,
 };
 
-static struct video_device hackrf_template = {
+static const struct video_device hackrf_template = {
.name = "HackRF One",
.release  = video_device_release_empty,
.fops = _fops,
-- 
1.9.1



[PATCH 09/11] [media] go7007: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/usb/go7007/go7007-v4l2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/go7007/go7007-v4l2.c 
b/drivers/media/usb/go7007/go7007-v4l2.c
index 445f17b..98cd57e 100644
--- a/drivers/media/usb/go7007/go7007-v4l2.c
+++ b/drivers/media/usb/go7007/go7007-v4l2.c
@@ -901,7 +901,7 @@ static int go7007_s_ctrl(struct v4l2_ctrl *ctrl)
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 };
 
-static struct video_device go7007_template = {
+static const struct video_device go7007_template = {
.name   = "go7007",
.fops   = _fops,
.release= video_device_release_empty,
-- 
1.9.1



[PATCH 07/11] [media] msi2500: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/usb/msi2500/msi2500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/msi2500/msi2500.c 
b/drivers/media/usb/msi2500/msi2500.c
index 79bfd2d..a097d3d 100644
--- a/drivers/media/usb/msi2500/msi2500.c
+++ b/drivers/media/usb/msi2500/msi2500.c
@@ -1143,7 +1143,7 @@ static int msi2500_enum_freq_bands(struct file *file, 
void *priv,
.unlocked_ioctl   = video_ioctl2,
 };
 
-static struct video_device msi2500_template = {
+static const struct video_device msi2500_template = {
.name = "Mirics MSi3101 SDR Dongle",
.release  = video_device_release_empty,
.fops = _fops,
-- 
1.9.1



[PATCH 05/11] [media] pwc: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/usb/pwc/pwc-if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
index 22420c1..eb6921d 100644
--- a/drivers/media/usb/pwc/pwc-if.c
+++ b/drivers/media/usb/pwc/pwc-if.c
@@ -146,7 +146,7 @@
.mmap = vb2_fop_mmap,
.unlocked_ioctl = video_ioctl2,
 };
-static struct video_device pwc_template = {
+static const struct video_device pwc_template = {
.name = "Philips Webcam",   /* Filled in later */
.release =  video_device_release_empty,
.fops = _fops,
-- 
1.9.1



[PATCH 06/11] [media] pvrusb2: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c 
b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
index 8f13c60..4320bda 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
@@ -1226,7 +1226,7 @@ static unsigned int pvr2_v4l2_poll(struct file *file, 
poll_table *wait)
 };
 
 
-static struct video_device vdev_template = {
+static const struct video_device vdev_template = {
.fops   = _fops,
 };
 
-- 
1.9.1



[PATCH 01/11] [media] zr364xx: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/usb/zr364xx/zr364xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/zr364xx/zr364xx.c 
b/drivers/media/usb/zr364xx/zr364xx.c
index d4bb56b..4ff8d0a 100644
--- a/drivers/media/usb/zr364xx/zr364xx.c
+++ b/drivers/media/usb/zr364xx/zr364xx.c
@@ -1335,7 +1335,7 @@ static unsigned int zr364xx_poll(struct file *file,
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 };
 
-static struct video_device zr364xx_template = {
+static const struct video_device zr364xx_template = {
.name = DRIVER_DESC,
.fops = _fops,
.ioctl_ops = _ioctl_ops,
-- 
1.9.1



[PATCH 11/11] [media] airspy: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/usb/airspy/airspy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/airspy/airspy.c 
b/drivers/media/usb/airspy/airspy.c
index 07f3f4e..e70c9e2 100644
--- a/drivers/media/usb/airspy/airspy.c
+++ b/drivers/media/usb/airspy/airspy.c
@@ -859,7 +859,7 @@ static int airspy_enum_freq_bands(struct file *file, void 
*priv,
.unlocked_ioctl   = video_ioctl2,
 };
 
-static struct video_device airspy_template = {
+static const struct video_device airspy_template = {
.name = "AirSpy SDR",
.release  = video_device_release_empty,
.fops = _fops,
-- 
1.9.1



[PATCH 10/11] [media] cpia2: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/usb/cpia2/cpia2_v4l.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/cpia2/cpia2_v4l.c 
b/drivers/media/usb/cpia2/cpia2_v4l.c
index 7122023..3dedd83 100644
--- a/drivers/media/usb/cpia2/cpia2_v4l.c
+++ b/drivers/media/usb/cpia2/cpia2_v4l.c
@@ -1075,7 +1075,7 @@ static void reset_camera_struct_v4l(struct camera_data 
*cam)
.mmap   = cpia2_mmap,
 };
 
-static struct video_device cpia2_template = {
+static const struct video_device cpia2_template = {
/* I could not find any place for the old .initialize initializer?? */
.name = "CPiA2 Camera",
.fops = _fops,
-- 
1.9.1



[GIT PULL FOR v4.14] ktime_t accessor functions

2017-08-26 Thread Sean Young
Hi Mauro,

Without the ktime_t accessor functions, the pre-v4.10 media_build broken.
Also there is a fix for the serial_ir on 32-bit builds.

Please merge where you see fit. 

Thanks

Sean

The following changes since commit 0779b8855c746c90b85bfe6e16d5dfa2a6a46655:

  media: ddbridge: fix semicolon.cocci warnings (2017-08-20 10:25:22 -0400)

are available in the git repository at:

  git://linuxtv.org/syoung/media_tree.git for-v4.14c

for you to fetch changes up to e4ea3e4bd643d133a5a3e7b708a7c7cf0f93586e:

  media: serial_ir: fix tx timing calculation on 32-bit (2017-08-26 09:26:29 
+0100)


Jasmin Jessich (1):
  media: rc: use ktime accessor functions

Sean Young (2):
  media: rc: gpio-ir-tx: use ktime accessor functions
  media: serial_ir: fix tx timing calculation on 32-bit

 drivers/media/rc/gpio-ir-tx.c | 12 +++-
 drivers/media/rc/rc-ir-raw.c  | 11 ++-
 drivers/media/rc/serial_ir.c  | 34 ++
 3 files changed, 27 insertions(+), 30 deletions(-)

diff --git a/drivers/media/rc/gpio-ir-tx.c b/drivers/media/rc/gpio-ir-tx.c
index 0b83408a2e18..cd476cab9782 100644
--- a/drivers/media/rc/gpio-ir-tx.c
+++ b/drivers/media/rc/gpio-ir-tx.c
@@ -98,15 +98,17 @@ static int gpio_ir_tx(struct rc_dev *dev, unsigned int 
*txbuf,
// pulse
ktime_t last = ktime_add_us(edge, txbuf[i]);
 
-   while (ktime_get() < last) {
+   while (ktime_before(ktime_get(), last)) {
gpiod_set_value(gpio_ir->gpio, 1);
-   edge += pulse;
-   delta = edge - ktime_get();
+   edge = ktime_add_ns(edge, pulse);
+   delta = ktime_to_ns(ktime_sub(edge,
+ ktime_get()));
if (delta > 0)
ndelay(delta);
gpiod_set_value(gpio_ir->gpio, 0);
-   edge += space;
-   delta = edge - ktime_get();
+   edge = ktime_add_ns(edge, space);
+   delta = ktime_to_ns(ktime_sub(edge,
+ ktime_get()));
if (delta > 0)
ndelay(delta);
}
diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c
index f495709e28fb..503bc425a187 100644
--- a/drivers/media/rc/rc-ir-raw.c
+++ b/drivers/media/rc/rc-ir-raw.c
@@ -106,7 +106,7 @@ int ir_raw_event_store_edge(struct rc_dev *dev, bool pulse)
return -EINVAL;
 
now = ktime_get();
-   ev.duration = ktime_sub(now, dev->raw->last_event);
+   ev.duration = ktime_to_ns(ktime_sub(now, dev->raw->last_event));
ev.pulse = !pulse;
 
rc = ir_raw_event_store(dev, );
@@ -474,18 +474,19 @@ EXPORT_SYMBOL(ir_raw_encode_scancode);
 static void edge_handle(unsigned long arg)
 {
struct rc_dev *dev = (struct rc_dev *)arg;
-   ktime_t interval = ktime_get() - dev->raw->last_event;
+   ktime_t interval = ktime_sub(ktime_get(), dev->raw->last_event);
 
-   if (interval >= dev->timeout) {
+   if (ktime_to_ns(interval) >= dev->timeout) {
DEFINE_IR_RAW_EVENT(ev);
 
ev.timeout = true;
-   ev.duration = interval;
+   ev.duration = ktime_to_ns(interval);
 
ir_raw_event_store(dev, );
} else {
mod_timer(>raw->edge_handle,
- jiffies + nsecs_to_jiffies(dev->timeout - interval));
+ jiffies + nsecs_to_jiffies(dev->timeout -
+ktime_to_ns(interval)));
}
 
ir_raw_event_handle(dev);
diff --git a/drivers/media/rc/serial_ir.c b/drivers/media/rc/serial_ir.c
index 4b8d5f38baf6..8b66926bc16a 100644
--- a/drivers/media/rc/serial_ir.c
+++ b/drivers/media/rc/serial_ir.c
@@ -139,10 +139,8 @@ struct serial_ir {
struct platform_device *pdev;
struct timer_list timeout_timer;
 
-   unsigned int freq;
+   unsigned int carrier;
unsigned int duty_cycle;
-
-   unsigned int pulse_width, space_width;
 };
 
 static struct serial_ir serial_ir;
@@ -183,18 +181,6 @@ static void off(void)
soutp(UART_MCR, hardware[type].off);
 }
 
-static void init_timing_params(unsigned int new_duty_cycle,
-  unsigned int new_freq)
-{
-   serial_ir.duty_cycle = new_duty_cycle;
-   serial_ir.freq = new_freq;
-
-   serial_ir.pulse_width = DIV_ROUND_CLOSEST(
-   new_duty_cycle * NSEC_PER_SEC, new_freq * 100l);
-   serial_ir.space_width = 

[PATCH 4/5] [media] sta2x11: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/pci/sta2x11/sta2x11_vip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c 
b/drivers/media/pci/sta2x11/sta2x11_vip.c
index 6343d24..eb5a9ea 100644
--- a/drivers/media/pci/sta2x11/sta2x11_vip.c
+++ b/drivers/media/pci/sta2x11/sta2x11_vip.c
@@ -754,7 +754,7 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void 
*priv,
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 };
 
-static struct video_device video_dev_template = {
+static const struct video_device video_dev_template = {
.name = KBUILD_MODNAME,
.release = video_device_release_empty,
.fops = _fops,
-- 
1.9.1



[PATCH 3/5] [media] solo6x10: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/pci/solo6x10/solo6x10-v4l2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2.c 
b/drivers/media/pci/solo6x10/solo6x10-v4l2.c
index 3266fc2..99ffd1e 100644
--- a/drivers/media/pci/solo6x10/solo6x10-v4l2.c
+++ b/drivers/media/pci/solo6x10/solo6x10-v4l2.c
@@ -630,7 +630,7 @@ static int solo_s_ctrl(struct v4l2_ctrl *ctrl)
.vidioc_unsubscribe_event   = v4l2_event_unsubscribe,
 };
 
-static struct video_device solo_v4l2_template = {
+static const struct video_device solo_v4l2_template = {
.name   = SOLO6X10_NAME,
.fops   = _v4l2_fops,
.ioctl_ops  = _v4l2_ioctl_ops,
-- 
1.9.1



[PATCH 5/5] [media] tw68: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/pci/tw68/tw68-video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/tw68/tw68-video.c 
b/drivers/media/pci/tw68/tw68-video.c
index 58c4dd7..8c1f4a0 100644
--- a/drivers/media/pci/tw68/tw68-video.c
+++ b/drivers/media/pci/tw68/tw68-video.c
@@ -916,7 +916,7 @@ static int vidioc_s_register(struct file *file, void *priv,
 #endif
 };
 
-static struct video_device tw68_video_template = {
+static const struct video_device tw68_video_template = {
.name   = "tw68_video",
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
-- 
1.9.1



[PATCH 2/5] [media] saa7134: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/pci/saa7134/saa7134-empress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/saa7134/saa7134-empress.c 
b/drivers/media/pci/saa7134/saa7134-empress.c
index b1d3648..66acfd3 100644
--- a/drivers/media/pci/saa7134/saa7134-empress.c
+++ b/drivers/media/pci/saa7134/saa7134-empress.c
@@ -205,7 +205,7 @@ static int empress_try_fmt_vid_cap(struct file *file, void 
*priv,
 
 /* --- */
 
-static struct video_device saa7134_empress_template = {
+static const struct video_device saa7134_empress_template = {
.name  = "saa7134-empress",
.fops  = _fops,
.ioctl_ops = _ioctl_ops,
-- 
1.9.1



[PATCH 1/5] [media] meye: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/pci/meye/meye.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c
index 0fe76be..49e047e 100644
--- a/drivers/media/pci/meye/meye.c
+++ b/drivers/media/pci/meye/meye.c
@@ -1533,7 +1533,7 @@ static int meye_mmap(struct file *file, struct 
vm_area_struct *vma)
.vidioc_default = vidioc_default,
 };
 
-static struct video_device meye_template = {
+static const struct video_device meye_template = {
.name   = "meye",
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
-- 
1.9.1



[PATCH 0/5] [media] PCI: make video_device const

2017-08-26 Thread Bhumika Goyal
Make video_device const.

Bhumika Goyal (5):
  [media] meye:  make video_device const
  [media] saa7134: make video_device const
  [media] solo6x10:  make video_device const
  [media] sta2x11: make video_device const
  [media] tw68:  make video_device const

 drivers/media/pci/meye/meye.c   | 2 +-
 drivers/media/pci/saa7134/saa7134-empress.c | 2 +-
 drivers/media/pci/solo6x10/solo6x10-v4l2.c  | 2 +-
 drivers/media/pci/sta2x11/sta2x11_vip.c | 2 +-
 drivers/media/pci/tw68/tw68-video.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

-- 
1.9.1



[PATCH v4 0/7] document types of hardware control for V4L2

2017-08-26 Thread Mauro Carvalho Chehab

On Kernel 2.6.39, the omap3 driver was introduced together with a new way
to control complex V4L2 devices used on embedded systems, but this was
never documented, as the original idea were to have "soon" support for
standard apps to use it as well, via libv4l, but that didn't happen so far.

Also, it is not possible for an userspace applicatin to detect the kind of
control a device supports.

This series fill the gap, by documenting the new type of hardware
control and adding a way for userspace to detect if the device can be
used or not by an standard V4L2 application.

Notes:


1) For the sake of better review, this series start with the addition of a
glossary, as requested by Laurent. Please notice, however, that
the glossary there references some new captions that will only be added
by subsequent patches. So, when this series get applied, the glossary
patch should actually be merged after the patches that introduce those
new captions, in order to avoid warnings for non-existing references.

2) This series doesn't contain patches that actually use the new flag.
This will be added after such patch gets reviewed.

v4:

- Addressed Hans comments for v2;
- Fixed broken references at the glossary.rst

v3:

- Add a glossary to be used by the new documentation about hardware control;
- Add a patch removing minor number range
- Use glossary terms at open.rst
- Split the notice about subdev-API on vdev-centric, as this change
   will require further discussions.

v2:

- added a patch at the beginning of the series better defining the
  device node naming rules;
- better defined the differenes between device hardware and V4L2 device node
  as suggested by Laurent and with changes proposed by Hans and Sakari
- changed the caps flag to indicate MC-centric devices
- removed the final patch that would use the new caps flag. I'll write it
  once we agree on the new caps flag.


Mauro Carvalho Chehab (7):
  media: add glossary.rst with a glossary of terms used at V4L2 spec
  media: open.rst: better document device node naming
  media: open.rst: remove the minor number range
  media: open.rst: document devnode-centric and mc-centric types
  media: open.rst: Adjust some terms to match the glossary
  media: videodev2: add a flag for MC-centric devices
  media: open.rst: add a notice about subdev-API on vdev-centric

 Documentation/media/uapi/v4l/glossary.rst|  98 ++
 Documentation/media/uapi/v4l/open.rst| 123 ---
 Documentation/media/uapi/v4l/v4l2.rst|   1 +
 Documentation/media/uapi/v4l/vidioc-querycap.rst |   5 +
 Documentation/media/videodev2.h.rst.exceptions   |   1 +
 include/uapi/linux/videodev2.h   |   2 +
 6 files changed, 216 insertions(+), 14 deletions(-)
 create mode 100644 Documentation/media/uapi/v4l/glossary.rst

-- 
2.13.3




[PATCH v4 6/7] media: videodev2: add a flag for MC-centric devices

2017-08-26 Thread Mauro Carvalho Chehab
As both vdev-centric and MC-centric devices may implement the
same APIs, we need a flag to allow userspace to distinguish
between them.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/v4l/open.rst| 7 +++
 Documentation/media/uapi/v4l/vidioc-querycap.rst | 5 +
 Documentation/media/videodev2.h.rst.exceptions   | 1 +
 include/uapi/linux/videodev2.h   | 2 ++
 4 files changed, 15 insertions(+)

diff --git a/Documentation/media/uapi/v4l/open.rst 
b/Documentation/media/uapi/v4l/open.rst
index 64b1de047b1b..d0930fc170f0 100644
--- a/Documentation/media/uapi/v4l/open.rst
+++ b/Documentation/media/uapi/v4l/open.rst
@@ -46,6 +46,13 @@ the periferal can be used. For such devices, the 
sub-devices' configuration
 can be controlled via the :ref:`sub-device API `, which creates one
 device node per sub-device.
 
+.. attention::
+
+   Devices that require **mc-centric** hardware peripheral control should
+   report a ``V4L2_MC_CENTRIC`` :c:type:`v4l2_capability` flag
+   (see :ref:`VIDIOC_QUERYCAP`).
+
+
 In summary, for **MC-centric** hardware peripheral control:
 
 - The **V4L2 device** node is responsible for controlling the streaming
diff --git a/Documentation/media/uapi/v4l/vidioc-querycap.rst 
b/Documentation/media/uapi/v4l/vidioc-querycap.rst
index 12e0d9a63cd8..2b08723375bc 100644
--- a/Documentation/media/uapi/v4l/vidioc-querycap.rst
+++ b/Documentation/media/uapi/v4l/vidioc-querycap.rst
@@ -252,6 +252,11 @@ specification the ioctl returns an ``EINVAL`` error code.
 * - ``V4L2_CAP_TOUCH``
   - 0x1000
   - This is a touch device.
+* - ``V4L2_MC_CENTRIC``
+  - 0x2000
+  - Indicates that the device require **mc-centric** hardware
+control, and thus can't be used by **v4l2-centric** applications.
+See :ref:`v4l2_hardware_control` for more details.
 * - ``V4L2_CAP_DEVICE_CAPS``
   - 0x8000
   - The driver fills the ``device_caps`` field. This capability can
diff --git a/Documentation/media/videodev2.h.rst.exceptions 
b/Documentation/media/videodev2.h.rst.exceptions
index a5cb0a8686ac..b51a575f9f75 100644
--- a/Documentation/media/videodev2.h.rst.exceptions
+++ b/Documentation/media/videodev2.h.rst.exceptions
@@ -157,6 +157,7 @@ replace define V4L2_CAP_META_CAPTURE device-capabilities
 replace define V4L2_CAP_READWRITE device-capabilities
 replace define V4L2_CAP_ASYNCIO device-capabilities
 replace define V4L2_CAP_STREAMING device-capabilities
+replace define V4L2_CAP_MC_CENTRIC device-capabilities
 replace define V4L2_CAP_DEVICE_CAPS device-capabilities
 replace define V4L2_CAP_TOUCH device-capabilities
 
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 45cf7359822c..7b490fe97980 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -460,6 +460,8 @@ struct v4l2_capability {
 
 #define V4L2_CAP_TOUCH  0x1000  /* Is a touch device */
 
+#define V4L2_CAP_MC_CENTRIC 0x2000  /* Device require 
mc-centric hardware control */
+
 #define V4L2_CAP_DEVICE_CAPS0x8000  /* sets device 
capabilities field */
 
 /*
-- 
2.13.3



[PATCH v4 3/7] media: open.rst: remove the minor number range

2017-08-26 Thread Mauro Carvalho Chehab
minor numbers use to range between 0 to 255, but that
was changed a long time ago. While it still applies when
CONFIG_VIDEO_FIXED_MINOR_RANGES, when the minor number is
dynamically allocated, this may not be true. In any case,
this is not relevant, as udev will take care of it.

So, remove this useless misinformation.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/v4l/open.rst | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Documentation/media/uapi/v4l/open.rst 
b/Documentation/media/uapi/v4l/open.rst
index fc0037091814..96ac972c1fa2 100644
--- a/Documentation/media/uapi/v4l/open.rst
+++ b/Documentation/media/uapi/v4l/open.rst
@@ -19,11 +19,10 @@ helper functions and a common application interface 
specified in this
 document.
 
 Each driver thus loaded registers one or more device nodes with major
-number 81 and a minor number between 0 and 255. Minor numbers are
-allocated dynamically unless the kernel is compiled with the kernel
-option CONFIG_VIDEO_FIXED_MINOR_RANGES. In that case minor numbers
-are allocated in ranges depending on the device node type (video, radio,
-etc.).
+number 81. Minor numbers are allocated dynamically unless the kernel
+is compiled with the kernel option CONFIG_VIDEO_FIXED_MINOR_RANGES.
+In that case minor numbers are allocated in ranges depending on the
+device node type.
 
 The existing V4L2 device node types are:
 
-- 
2.13.3



[PATCH v4 1/7] media: add glossary.rst with a glossary of terms used at V4L2 spec

2017-08-26 Thread Mauro Carvalho Chehab
Add a glossary of terms for V4L2, as several concepts are complex
enough to cause misunderstandings.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/v4l/glossary.rst | 98 +++
 Documentation/media/uapi/v4l/v4l2.rst |  1 +
 2 files changed, 99 insertions(+)
 create mode 100644 Documentation/media/uapi/v4l/glossary.rst

diff --git a/Documentation/media/uapi/v4l/glossary.rst 
b/Documentation/media/uapi/v4l/glossary.rst
new file mode 100644
index ..e55cd357dad3
--- /dev/null
+++ b/Documentation/media/uapi/v4l/glossary.rst
@@ -0,0 +1,98 @@
+
+Glossary
+
+
+.. note::
+
+   This goal of section is to standardize the terms used within the V4L2
+   documentation. It is written incrementally as they're standardized at
+   the V4L2 documentation. So, it is an incomplete Work In Progress.
+
+.. Please keep the glossary entries in alphabetical order
+
+.. glossary::
+
+Bridge driver
+The same as V4L2 main driver.
+
+Device Node
+A character device node at the file system used to control and do
+input/output data transfers to a Kernel driver.
+
+Driver
+The part of the Linux Kernel that implements support
+for a hardware component.
+
+Inter-Integrated Circuit - I²C
+A  multi-master, multi-slave, packet switched, single-ended,
+serial computer bus used to control V4L2 sub-devices
+
+Hardware component
+a subset of the media hardware.
+
+Hardware peripheral
+A group of hardware components that together make a larger
+user-facing functional peripheral. For instance the SoC ISP IP
+cores and external camera sensors together make a
+camera hardware peripheral.
+Also known as peripheral.
+
+Hardware peripheral control
+Type of control that it is possible for a V4L2 hardware peripheral.
+
+See :ref:`v4l2_hardware_control`.
+
+Peripheral
+The same as hardware peripheral.
+
+Media Controller
+An API used to identify the hardware components.
+
+See :ref:`media_controller`.
+
+MC-centric
+V4L2 hardware that requires a Media controller to be controlled.
+
+See :ref:`v4l2_hardware_control`.
+
+SMBus
+A subset of I²C, with defines a stricter usage of the bus.
+
+Serial Peripheral Interface Bus - SPI
+Synchronous serial communication interface specification used for
+short distance communication, primarily in embedded systems.
+
+Sub-device hardware components
+hardware components that aren't controlled by the
+V4L2 main driver.
+
+V4L2 device node
+A device node that it is associated to a V4L2 main driver,
+as specified at :ref:`v4l2_device_naming`.
+
+V4L2 hardware
+A hardware used to on a media device supported by the V4L2
+subsystem.
+
+V4L2 hardware control
+The type of hardware control that a device supports.
+
+See :ref:`v4l2_hardware_control`.
+
+V4L2 main driver
+The V4L2 device driver that implements the main logic to talk with
+the V4L2 hardware.
+Also known as bridge driver.
+
+See :ref:`v4l2_hardware_control`.
+
+V4L2 sub-device
+part of the media hardware that it is implemented by a device
+driver that is not part of the main V4L2 driver.
+
+See :ref:`subdev`.
+
+Vdev-centric
+V4L2 hardware that it is controlled via V4L2 device nodes.
+
+See :ref:`v4l2_hardware_control`.
diff --git a/Documentation/media/uapi/v4l/v4l2.rst 
b/Documentation/media/uapi/v4l/v4l2.rst
index f52a11c949d3..1ee4b86d18e1 100644
--- a/Documentation/media/uapi/v4l/v4l2.rst
+++ b/Documentation/media/uapi/v4l/v4l2.rst
@@ -31,6 +31,7 @@ This part describes the Video for Linux API version 2 (V4L2 
API) specification.
 videodev
 capture-example
 v4l2grab-example
+glossary
 biblio
 
 
-- 
2.13.3



[PATCH v4 2/7] media: open.rst: better document device node naming

2017-08-26 Thread Mauro Carvalho Chehab
Right now, only kAPI documentation describes the device naming.
However, such description is needed at the uAPI too. Add it,
and describe how to get an unique identify for a given device.

Acked-by: Hans Verkuil 
Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/v4l/open.rst | 39 ---
 1 file changed, 36 insertions(+), 3 deletions(-)

diff --git a/Documentation/media/uapi/v4l/open.rst 
b/Documentation/media/uapi/v4l/open.rst
index afd116edb40d..fc0037091814 100644
--- a/Documentation/media/uapi/v4l/open.rst
+++ b/Documentation/media/uapi/v4l/open.rst
@@ -7,12 +7,14 @@ Opening and Closing Devices
 ***
 
 
-Device Naming
-=
+.. _v4l2_device_naming:
+
+V4L2 Device Node Naming
+===
 
 V4L2 drivers are implemented as kernel modules, loaded manually by the
 system administrator or automatically when a device is first discovered.
-The driver modules plug into the "videodev" kernel module. It provides
+The driver modules plug into the ``videodev`` kernel module. It provides
 helper functions and a common application interface specified in this
 document.
 
@@ -23,6 +25,37 @@ option CONFIG_VIDEO_FIXED_MINOR_RANGES. In that case minor 
numbers
 are allocated in ranges depending on the device node type (video, radio,
 etc.).
 
+The existing V4L2 device node types are:
+
+ ==
+Default device node name Usage
+ ==
+``/dev/videoX`` Video input/output devices
+``/dev/vbiX``   Vertical blank data (i.e. closed captions, teletext)
+``/dev/radioX`` Radio tuners and modulators
+``/dev/swradioX``   Software Defined Radio tuners and modulators
+``/dev/v4l-touchX`` Touch sensors
+ ==
+
+Where ``X`` is a non-negative number.
+
+.. note::
+
+   1. The actual device node name is system-dependent, as udev rules may apply.
+   2. There is no warranty that ``X`` will remain the same for the same
+  device, as the number depends on the device driver's probe order.
+  If you need an unique name, udev default rules produce
+  ``/dev/v4l/by-id/`` and ``/dev/v4l/by-path/`` directoiries containing
+  links that can be used uniquely to identify a V4L2 device node::
+
+   $ tree /dev/v4l
+   /dev/v4l
+   ├── by-id
+   │   └── usb-OmniVision._USB_Camera-B4.04.27.1-video-index0 -> 
../../video0
+   └── by-path
+   └── pci-:00:14.0-usb-0:2:1.0-video-index0 -> ../../video0
+
+
 Many drivers support "video_nr", "radio_nr" or "vbi_nr" module
 options to select specific video/radio/vbi node numbers. This allows the
 user to request that the device node is named e.g. /dev/video5 instead
-- 
2.13.3



[PATCH v4 4/7] media: open.rst: document devnode-centric and mc-centric types

2017-08-26 Thread Mauro Carvalho Chehab
When we added support for omap3, back in 2010, we added a new
type of V4L2 devices that aren't fully controlled via the V4L2
device node.

Yet, we have never clearly documented in the V4L2 specification
the differences between the two types.

Let's document them based on the the current implementation.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/v4l/open.rst | 49 +++
 1 file changed, 49 insertions(+)

diff --git a/Documentation/media/uapi/v4l/open.rst 
b/Documentation/media/uapi/v4l/open.rst
index 96ac972c1fa2..51acb8de8ba8 100644
--- a/Documentation/media/uapi/v4l/open.rst
+++ b/Documentation/media/uapi/v4l/open.rst
@@ -7,6 +7,55 @@ Opening and Closing Devices
 ***
 
 
+.. _v4l2_hardware_control:
+
+
+Types of V4L2 hardware peripheral control
+=
+
+V4L2 hardware periferal is usually complex: support for it is
+implemented via a V4L2 main driver and often by several additional drivers.
+The main driver always exposes one or more **V4L2 device nodes**
+(see :ref:`v4l2_device_naming`).
+
+The other drivers are called **V4L2 sub-devices** and provide control to
+other hardware components usually connected via a serial bus (like
+I²C, SMBus or SPI). Depending on the main driver, they can be implicitly
+controlled directly by the main driver or explicitly via
+the **V4L2 sub-device API** (see :ref:`subdev`).
+
+When V4L2 was originally designed, there was only one type of
+peripheral control: via the **V4L2 device nodes**. We refer to this kind
+of control as **V4L2 device node centric** (or, simply, "**vdev-centric**").
+
+Later (kernel 2.6.39), a new type of periferal control was
+added in order to support complex peripherals that are common for embedded
+systems. This type of periferal is controlled mainly via the media
+controller and V4L2 sub-devices. So, it is called
+**Media controller centric** (or, simply, "**MC-centric**").
+
+For **vdev-centric** hardware peripheral control, the peripheral is
+controlled via the **V4L2 device nodes**. They may optionally support the
+:ref:`media controller API ` as well, in order to let
+the application to know which device nodes are available
+(see :ref:`related`).
+
+For **MC-centric** hardware peripheral control it is required to configure
+the pipelines via the :ref:`media controller API ` before
+the periferal can be used. For such devices, the sub-devices' configuration
+can be controlled via the :ref:`sub-device API `, which creates one
+device node per sub-device.
+
+In summary, for **MC-centric** hardware peripheral control:
+
+- The **V4L2 device** node is responsible for controlling the streaming
+  features;
+- The **media controller device** is responsible to setup the pipelines
+  at the peripheral;
+- The **V4L2 sub-devices** are responsible for V4L2 sub-device
+  specific settings at the sub-device hardware components.
+
+
 .. _v4l2_device_naming:
 
 V4L2 Device Node Naming
-- 
2.13.3



Re: [PATCH 00/10] [media] platform: make video_device const

2017-08-26 Thread Bhumika Goyal
On Sat, Aug 26, 2017 at 5:29 PM, Mauro Carvalho Chehab
 wrote:
> Em Sat, 26 Aug 2017 15:50:02 +0530
> Bhumika Goyal  escreveu:
>
>> Make make video_device const.
>>
>> Bhumika Goyal (10):
>>   [media] cx88: make video_device const
>>   [media] dt3155: make video_device const
>>   [media]: marvell-ccic: make video_device const
>>   [media] mx2-emmaprp: make video_device const
>>   [media]: s5p-g2d: make video_device const
>>   [media]: ti-vpe:  make video_device const
>>   [media] via-camera: make video_device const
>>   [media]: fsl-viu: make video_device const
>>   [media] m2m-deinterlace: make video_device const
>>   [media] vim2m: make video_device const
>>
>>  drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
>>  drivers/media/pci/dt3155/dt3155.c   | 2 +-
>>  drivers/media/platform/fsl-viu.c| 2 +-
>>  drivers/media/platform/m2m-deinterlace.c| 2 +-
>>  drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
>>  drivers/media/platform/mx2_emmaprp.c| 2 +-
>>  drivers/media/platform/s5p-g2d/g2d.c| 2 +-
>>  drivers/media/platform/ti-vpe/cal.c | 2 +-
>>  drivers/media/platform/ti-vpe/vpe.c | 2 +-
>>  drivers/media/platform/via-camera.c | 2 +-
>>  drivers/media/platform/vim2m.c  | 2 +-
>
> Please, don't do one such cleanup patch per file. Instead, group
> it per subdirectory, e. g. on e patch for:
> drivers/media/platform/
>
> and another one for:
> drivers/media/pci/
>
> That makes a lot easier to review and apply.
>

Okay, I will keep this in mind. Should I send a v2 for both the series?

Thanks,
Bhumika

> Thanks,
> Mauro


Re: [PATCH v4] drm/bridge/sii8620: add remote control support

2017-08-26 Thread Sean Young
On Thu, Aug 24, 2017 at 10:58:07AM +0200, Maciej Purski wrote:
> MHL specification defines Remote Control Protocol(RCP) to
> send input events between MHL devices.
> The driver now recognizes RCP messages and reacts to them
> by reporting key events to input subsystem, allowing
> a user to control a device using TV remote control.
> 
> Signed-off-by: Maciej Purski 
> ---
> 
> Changes in v2:
> - use RC subsystem (including CEC keymap)
> - RC device initialized in attach drm_bridge callback and
>   removed in detach callback. This is necessary, because RC_CORE,
>   which is needed during rc_dev init, is loaded after sii8620.
>   DRM bridge is binded later which solves the problem.
> - add RC_CORE dependency
> 
> Changes in v3:
> - fix error handling in init_rcp and in attach callback
> 
> Changes in v4:
> - usage of rc-core API compatible with upcoming changes
> - fix error handling in init_rcp
> - fix commit message

Looks good.

Acked-by: Sean Young 

> ---
>  drivers/gpu/drm/bridge/Kconfig   |  2 +-
>  drivers/gpu/drm/bridge/sil-sii8620.c | 96 
> ++--
>  include/drm/bridge/mhl.h |  4 ++
>  3 files changed, 96 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
> index adf9ae0..6ef901c 100644
> --- a/drivers/gpu/drm/bridge/Kconfig
> +++ b/drivers/gpu/drm/bridge/Kconfig
> @@ -71,7 +71,7 @@ config DRM_PARADE_PS8622
>  
>  config DRM_SIL_SII8620
>   tristate "Silicon Image SII8620 HDMI/MHL bridge"
> - depends on OF
> + depends on OF && RC_CORE
>   select DRM_KMS_HELPER
>   help
> Silicon Image SII8620 HDMI/MHL bridge chip driver.
> diff --git a/drivers/gpu/drm/bridge/sil-sii8620.c 
> b/drivers/gpu/drm/bridge/sil-sii8620.c
> index 2d51a22..ecb26c4 100644
> --- a/drivers/gpu/drm/bridge/sil-sii8620.c
> +++ b/drivers/gpu/drm/bridge/sil-sii8620.c
> @@ -28,6 +28,8 @@
>  #include 
>  #include 
>  
> +#include 
> +
>  #include "sil-sii8620.h"
>  
>  #define SII8620_BURST_BUF_LEN 288
> @@ -58,6 +60,7 @@ enum sii8620_mt_state {
>  struct sii8620 {
>   struct drm_bridge bridge;
>   struct device *dev;
> + struct rc_dev *rc_dev;
>   struct clk *clk_xtal;
>   struct gpio_desc *gpio_reset;
>   struct gpio_desc *gpio_int;
> @@ -431,6 +434,16 @@ static void sii8620_mt_rap(struct sii8620 *ctx, u8 code)
>   sii8620_mt_msc_msg(ctx, MHL_MSC_MSG_RAP, code);
>  }
>  
> +static void sii8620_mt_rcpk(struct sii8620 *ctx, u8 code)
> +{
> + sii8620_mt_msc_msg(ctx, MHL_MSC_MSG_RCPK, code);
> +}
> +
> +static void sii8620_mt_rcpe(struct sii8620 *ctx, u8 code)
> +{
> + sii8620_mt_msc_msg(ctx, MHL_MSC_MSG_RCPE, code);
> +}
> +
>  static void sii8620_mt_read_devcap_send(struct sii8620 *ctx,
>   struct sii8620_mt_msg *msg)
>  {
> @@ -1753,6 +1766,25 @@ static void sii8620_send_features(struct sii8620 *ctx)
>   sii8620_write_buf(ctx, REG_MDT_XMIT_WRITE_PORT, buf, ARRAY_SIZE(buf));
>  }
>  
> +static bool sii8620_rcp_consume(struct sii8620 *ctx, u8 scancode)
> +{
> + bool pressed = !(scancode & MHL_RCP_KEY_RELEASED_MASK);
> +
> + scancode &= MHL_RCP_KEY_ID_MASK;
> +
> + if (!ctx->rc_dev) {
> + dev_dbg(ctx->dev, "RCP input device not initialized\n");
> + return false;
> + }
> +
> + if (pressed)
> + rc_keydown(ctx->rc_dev, RC_PROTO_CEC, scancode, 0);
> + else
> + rc_keyup(ctx->rc_dev);
> +
> + return true;
> +}
> +
>  static void sii8620_msc_mr_set_int(struct sii8620 *ctx)
>  {
>   u8 ints[MHL_INT_SIZE];
> @@ -1804,19 +1836,25 @@ static void sii8620_msc_mt_done(struct sii8620 *ctx)
>  
>  static void sii8620_msc_mr_msc_msg(struct sii8620 *ctx)
>  {
> - struct sii8620_mt_msg *msg = sii8620_msc_msg_first(ctx);
> + struct sii8620_mt_msg *msg;
>   u8 buf[2];
>  
> - if (!msg)
> - return;
> -
>   sii8620_read_buf(ctx, REG_MSC_MR_MSC_MSG_RCVD_1ST_DATA, buf, 2);
>  
>   switch (buf[0]) {
>   case MHL_MSC_MSG_RAPK:
> + msg = sii8620_msc_msg_first(ctx);
> + if (!msg)
> + return;
>   msg->ret = buf[1];
>   ctx->mt_state = MT_STATE_DONE;
>   break;
> + case MHL_MSC_MSG_RCP:
> + if (!sii8620_rcp_consume(ctx, buf[1]))
> + sii8620_mt_rcpe(ctx,
> + MHL_RCPE_STATUS_INEFFECTIVE_KEY_CODE);
> + sii8620_mt_rcpk(ctx, buf[1]);
> + break;
>   default:
>   dev_err(ctx->dev, "%s message type %d,%d not supported",
>   __func__, buf[0], buf[1]);
> @@ -2102,11 +2140,57 @@ static void sii8620_cable_in(struct sii8620 *ctx)
>   enable_irq(to_i2c_client(ctx->dev)->irq);
>  }
>  
> +static void sii8620_init_rcp_input_dev(struct sii8620 *ctx)
> +{
> + struct rc_dev *rc_dev;
> + int ret;
> +
> +   

[PATCH 4/4] docs-rst: don't require adjustbox anymore

2017-08-26 Thread Mauro Carvalho Chehab
Only the media PDF book was requiring adjustbox, in order to
scale big tables. That worked pretty good with Sphinx versions
1.4 and 1.5, but Spinx 1.6 changed the way tables are produced,
by introducing some weird macros before tabulary.
That causes adjustbox to fail. So, it can't be used anymore,
and its usage was removed from the media book.

So, let's remove it from conf.py and sphinx-pre-install.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/conf.py  | 3 ---
 scripts/sphinx-pre-install | 1 -
 2 files changed, 4 deletions(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index f9054ab60cb1..4c87bc10220c 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -331,9 +331,6 @@ latex_elements = {
 \\setromanfont{DejaVu Sans}
 \\setmonofont{DejaVu Sans Mono}
 
-   % To allow adjusting table sizes
-   \\usepackage{adjustbox}
-
  '''
 }
 
diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index 677756ae34c9..067459760a7b 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -40,7 +40,6 @@ my $virtualenv = 1;
 #
 
 my %texlive = (
-   'adjustbox.sty'  => 'texlive-adjustbox',
'amsfonts.sty'   => 'texlive-amsfonts',
'amsmath.sty'=> 'texlive-amsmath',
'amssymb.sty'=> 'texlive-amsfonts',
-- 
2.13.3



[PATCH 6/6] media: dvbproperty.rst: minor editorial changes

2017-08-26 Thread Mauro Carvalho Chehab
Do some minor editorial changes to make this chapter visually
better, and the example a little bit clearer.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/dvb/dvbproperty.rst | 25 -
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/Documentation/media/uapi/dvb/dvbproperty.rst 
b/Documentation/media/uapi/dvb/dvbproperty.rst
index 1e8fc75e469d..843f1d70aff0 100644
--- a/Documentation/media/uapi/dvb/dvbproperty.rst
+++ b/Documentation/media/uapi/dvb/dvbproperty.rst
@@ -8,8 +8,8 @@ DVB Frontend properties
 Tuning into a Digital TV physical channel and starting decoding it
 requires changing a set of parameters, in order to control the tuner,
 the demodulator, the Linear Low-noise Amplifier (LNA) and to set the
-antenna subsystem via Satellite Equipment Control (SEC), on satellite
-systems. The actual parameters are specific to each particular digital
+antenna subsystem via Satellite Equipment Control - SEC (on satellite
+systems). The actual parameters are specific to each particular digital
 TV standards, and may change as the digital TV specs evolves.
 
 In the past (up to DVB API version 3), the strategy used was to have a
@@ -41,25 +41,24 @@ with suppports all digital TV delivery systems.
4. DVB API version 5 is also called *S2API*, as the first
   new standard added to it was DVB-S2.
 
-Example: with the properties based approach, in order to set the tuner
-to a DVB-C channel at 651 kHz, modulated with 256-QAM, FEC 3/4 and
-symbol rate of 5.217 Mbauds, those properties should be sent to
+**Example**: in order to set the hardware to tune into a DVB-C channel
+at 651 kHz, modulated with 256-QAM, FEC 3/4 and symbol rate of 5.217
+Mbauds, those properties should be sent to
 :ref:`FE_SET_PROPERTY ` ioctl:
 
--  :ref:`DTV_DELIVERY_SYSTEM ` =
-   SYS_DVBC_ANNEX_A
+  :ref:`DTV_DELIVERY_SYSTEM ` = SYS_DVBC_ANNEX_A
 
--  :ref:`DTV_FREQUENCY ` = 65100
+  :ref:`DTV_FREQUENCY ` = 65100
 
--  :ref:`DTV_MODULATION ` = QAM_256
+  :ref:`DTV_MODULATION ` = QAM_256
 
--  :ref:`DTV_INVERSION ` = INVERSION_AUTO
+  :ref:`DTV_INVERSION ` = INVERSION_AUTO
 
--  :ref:`DTV_SYMBOL_RATE ` = 5217000
+  :ref:`DTV_SYMBOL_RATE ` = 5217000
 
--  :ref:`DTV_INNER_FEC ` = FEC_3_4
+  :ref:`DTV_INNER_FEC ` = FEC_3_4
 
--  :ref:`DTV_TUNE `
+  :ref:`DTV_TUNE `
 
 The code that would that would do the above is show in
 :ref:`dtv-prop-example`.
-- 
2.13.3



[PATCH 4/6] media: frontend.rst: mention MMT at the documentation

2017-08-26 Thread Mauro Carvalho Chehab
The ATSC 3.0 uses MPEG Media Transport, with is not currently
supported. Yet, we'll need to implement it sooner or later.
So, mention about it at the specs.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/dvb/frontend.rst | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Documentation/media/uapi/dvb/frontend.rst 
b/Documentation/media/uapi/dvb/frontend.rst
index 0bfade2b72cf..40adcd0da2dc 100644
--- a/Documentation/media/uapi/dvb/frontend.rst
+++ b/Documentation/media/uapi/dvb/frontend.rst
@@ -33,9 +33,8 @@ Data types and ioctl definitions can be accessed by including
 
 .. note::
 
-   Transmission via the internet (DVB-IP) is not yet handled by this
-   API but a future extension is possible.
-
+   Transmission via the internet (DVB-IP) and MMT (MPEG Media Transport)
+   is not yet handled by this API but a future extension is possible.
 
 .. [#f1]
 
-- 
2.13.3



[PATCH 3/6] media: frontend.rst: convert SEC note into footnote

2017-08-26 Thread Mauro Carvalho Chehab
The description of what SEC means fits well as a footnote.
That makes the need of saying that SEC is only for Satellite
when it was mentioned, as the footnote already says that.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/dvb/frontend.rst | 19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/Documentation/media/uapi/dvb/frontend.rst 
b/Documentation/media/uapi/dvb/frontend.rst
index 313f46a4c6a6..0bfade2b72cf 100644
--- a/Documentation/media/uapi/dvb/frontend.rst
+++ b/Documentation/media/uapi/dvb/frontend.rst
@@ -25,7 +25,7 @@ The DVB frontend controls several sub-devices including:
 
 -  Low noise amplifier (LNA)
 
--  Satellite Equipment Control (SEC) hardware (only for Satellite).
+-  Satellite Equipment Control (SEC) [#f1]_.
 
 The frontend can be accessed through ``/dev/dvb/adapter?/frontend?``.
 Data types and ioctl definitions can be accessed by including
@@ -36,13 +36,16 @@ Data types and ioctl definitions can be accessed by 
including
Transmission via the internet (DVB-IP) is not yet handled by this
API but a future extension is possible.
 
-On Satellite systems, the API support for the Satellite Equipment
-Control (SEC) allows to power control and to send/receive signals to
-control the antenna subsystem, selecting the polarization and choosing
-the Intermediate Frequency IF) of the Low Noise Block Converter Feed
-Horn (LNBf). It supports the DiSEqC and V-SEC protocols. The DiSEqC
-(digital SEC) specification is available at
-`Eutelsat `__.
+
+.. [#f1]
+
+   On Satellite systems, the API support for the Satellite Equipment
+   Control (SEC) allows to power control and to send/receive signals to
+   control the antenna subsystem, selecting the polarization and choosing
+   the Intermediate Frequency IF) of the Low Noise Block Converter Feed
+   Horn (LNBf). It supports the DiSEqC and V-SEC protocols. The DiSEqC
+   (digital SEC) specification is available at
+   `Eutelsat `__.
 
 
 .. toctree::
-- 
2.13.3



[PATCH 2/6] media: frontend.rst: fix supported delivery systems

2017-08-26 Thread Mauro Carvalho Chehab
The introduction for the frontend chapter is not quite
correct:
  - it tells that it supports only three types of
delivery systems, in opposite to three *groups*;
  - It adds ISDB-C to the list of supported systems,
but, this is not true.

Fix it.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/dvb/frontend.rst | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Documentation/media/uapi/dvb/frontend.rst 
b/Documentation/media/uapi/dvb/frontend.rst
index e051a9012540..313f46a4c6a6 100644
--- a/Documentation/media/uapi/dvb/frontend.rst
+++ b/Documentation/media/uapi/dvb/frontend.rst
@@ -5,13 +5,15 @@
 
 DVB Frontend API
 
-The DVB frontend API was designed to support three types of delivery
-systems:
+
+The DVB frontend API was designed to support three groups of delivery
+systems: Terrestrial, cable and Satellite. Currently, the following
+delivery systems are supported:
 
 -  Terrestrial systems: DVB-T, DVB-T2, ATSC, ATSC M/H, ISDB-T, DVB-H,
DTMB, CMMB
 
--  Cable systems: DVB-C Annex A/C, ClearQAM (DVB-C Annex B), ISDB-C
+-  Cable systems: DVB-C Annex A/C, ClearQAM (DVB-C Annex B)
 
 -  Satellite systems: DVB-S, DVB-S2, DVB Turbo, ISDB-S, DSS
 
-- 
2.13.3



[PATCH 5/6] media: dvbproperty.rst: improve notes about legacy frontend calls

2017-08-26 Thread Mauro Carvalho Chehab
The description of the DVBv5 API was written a long time ago,
where the API was still new, and there were not apps using it.

Now that the API is stable and used by new applications, clarify
that DVBv3 calls should not be used and why.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/dvb/dvbproperty.rst | 39 ++--
 1 file changed, 25 insertions(+), 14 deletions(-)

diff --git a/Documentation/media/uapi/dvb/dvbproperty.rst 
b/Documentation/media/uapi/dvb/dvbproperty.rst
index dd2d71ce43fa..1e8fc75e469d 100644
--- a/Documentation/media/uapi/dvb/dvbproperty.rst
+++ b/Documentation/media/uapi/dvb/dvbproperty.rst
@@ -12,23 +12,34 @@ antenna subsystem via Satellite Equipment Control (SEC), on 
satellite
 systems. The actual parameters are specific to each particular digital
 TV standards, and may change as the digital TV specs evolves.
 
-In the past, the strategy used was to have a union with the parameters
-needed to tune for DVB-S, DVB-C, DVB-T and ATSC delivery systems grouped
-there. The problem is that, as the second generation standards appeared,
-those structs were not big enough to contain the additional parameters.
-Also, the union didn't have any space left to be expanded without
-breaking userspace. So, the decision was to deprecate the legacy
-union/struct based approach, in favor of a properties set approach.
+In the past (up to DVB API version 3), the strategy used was to have a
+union with the parameters needed to tune for DVB-S, DVB-C, DVB-T and
+ATSC delivery systems grouped there. The problem is that, as the second
+generation standards appeared, the size of such union was not big
+enough to group the structs that would be required for those new
+standards. Also, extending it would break userspace.
+
+So, the legacy union/struct based approach was deprecated, in favor
+of a properties set approach.
+
+This section describes the new and recommended way to set the frontend,
+with suppports all digital TV delivery systems.
 
 .. note::
 
-   On Linux DVB API version 3, setting a frontend were done via
-   struct :c:type:`dvb_frontend_parameters`.
-   This got replaced on version 5 (also called "S2API", as this API were
-   added originally_enabled to provide support for DVB-S2), because the
-   old API has a very limited support to new standards and new hardware.
-   This section describes the new and recommended way to set the frontend,
-   with suppports all digital TV delivery systems.
+   1. On Linux DVB API version 3, setting a frontend was done via
+  struct :c:type:`dvb_frontend_parameters`.
+
+   2. Don't use DVB API version 3 calls on hardware with supports
+  newer standards. Such API provides no suport or a very limited
+  support to new standards and/or new hardware.
+
+   3. Nowadays, most frontends support multiple delivery systems.
+  Only with DVB v5 calls it is possible to switch between
+  the multiple delivery systems supported by a frontend.
+
+   4. DVB API version 5 is also called *S2API*, as the first
+  new standard added to it was DVB-S2.
 
 Example: with the properties based approach, in order to set the tuner
 to a DVB-C channel at 651 kHz, modulated with 256-QAM, FEC 3/4 and
-- 
2.13.3



[PATCH 1/6] media: dvb/intro.rst: Use verbatim font where needed

2017-08-26 Thread Mauro Carvalho Chehab
The device numbering for DVB uses "M" and "N" as vars for the
number of the device, but sometimes this is printed using normal
font instead of verbatim.

While here, remove an extra space after quotation marks.

This is a minor cleanup with no changes at the text.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/dvb/intro.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/media/uapi/dvb/intro.rst 
b/Documentation/media/uapi/dvb/intro.rst
index 652c4aacd2c6..20bd7aec2665 100644
--- a/Documentation/media/uapi/dvb/intro.rst
+++ b/Documentation/media/uapi/dvb/intro.rst
@@ -137,9 +137,9 @@ individual devices are called:
 
 -  ``/dev/dvb/adapterN/caM``,
 
-where N enumerates the DVB PCI cards in a system starting from 0, and M
+where ``N`` enumerates the DVB PCI cards in a system starting from 0, and ``M``
 enumerates the devices of each type within each adapter, starting
-from 0, too. We will omit the “ ``/dev/dvb/adapterN/``\ ” in the further
+from 0, too. We will omit the “``/dev/dvb/adapterN/``\ ” in the further
 discussion of these devices.
 
 More details about the data structures and function calls of all the
-- 
2.13.3



[PATCH] [media] Staging: media: radio-bcm2048: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c 
b/drivers/staging/media/bcm2048/radio-bcm2048.c
index 86d7fc2..58adaea 100644
--- a/drivers/staging/media/bcm2048/radio-bcm2048.c
+++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
@@ -2564,7 +2564,7 @@ static int bcm2048_vidioc_s_hw_freq_seek(struct file 
*file, void *priv,
 /*
  * bcm2048_viddev_template - video device interface
  */
-static struct video_device bcm2048_viddev_template = {
+static const struct video_device bcm2048_viddev_template = {
.fops   = _fops,
.name   = BCM2048_DRIVER_NAME,
.release= video_device_release_empty,
-- 
1.9.1



Re: [PATCH 00/10] [media] platform: make video_device const

2017-08-26 Thread Mauro Carvalho Chehab
Em Sat, 26 Aug 2017 15:50:02 +0530
Bhumika Goyal  escreveu:

> Make make video_device const.
> 
> Bhumika Goyal (10):
>   [media] cx88: make video_device const
>   [media] dt3155: make video_device const
>   [media]: marvell-ccic: make video_device const
>   [media] mx2-emmaprp: make video_device const
>   [media]: s5p-g2d: make video_device const
>   [media]: ti-vpe:  make video_device const
>   [media] via-camera: make video_device const
>   [media]: fsl-viu: make video_device const
>   [media] m2m-deinterlace: make video_device const
>   [media] vim2m: make video_device const
> 
>  drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
>  drivers/media/pci/dt3155/dt3155.c   | 2 +-
>  drivers/media/platform/fsl-viu.c| 2 +-
>  drivers/media/platform/m2m-deinterlace.c| 2 +-
>  drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
>  drivers/media/platform/mx2_emmaprp.c| 2 +-
>  drivers/media/platform/s5p-g2d/g2d.c| 2 +-
>  drivers/media/platform/ti-vpe/cal.c | 2 +-
>  drivers/media/platform/ti-vpe/vpe.c | 2 +-
>  drivers/media/platform/via-camera.c | 2 +-
>  drivers/media/platform/vim2m.c  | 2 +-

Please, don't do one such cleanup patch per file. Instead, group
it per subdirectory, e. g. on e patch for:
drivers/media/platform/

and another one for:
drivers/media/pci/

That makes a lot easier to review and apply.

Thanks,
Mauro


[PATCH] [media] radio: make video_device const

2017-08-26 Thread Bhumika Goyal
Make these const as they are only used in a copy operation.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/radio/radio-tea5764.c| 2 +-
 drivers/media/radio/radio-wl1273.c | 2 +-
 drivers/media/radio/si4713/radio-platform-si4713.c | 2 +-
 drivers/media/radio/wl128x/fmdrv_v4l2.c| 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/radio/radio-tea5764.c 
b/drivers/media/radio/radio-tea5764.c
index 9db8331..bc7e69e 100644
--- a/drivers/media/radio/radio-tea5764.c
+++ b/drivers/media/radio/radio-tea5764.c
@@ -414,7 +414,7 @@ static int tea5764_s_ctrl(struct v4l2_ctrl *ctrl)
 };
 
 /* V4L2 interface */
-static struct video_device tea5764_radio_template = {
+static const struct video_device tea5764_radio_template = {
.name   = "TEA5764 FM-Radio",
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
diff --git a/drivers/media/radio/radio-wl1273.c 
b/drivers/media/radio/radio-wl1273.c
index 17e82a9..903fcd5 100644
--- a/drivers/media/radio/radio-wl1273.c
+++ b/drivers/media/radio/radio-wl1273.c
@@ -1982,7 +1982,7 @@ static void wl1273_vdev_release(struct video_device *dev)
.vidioc_log_status  = wl1273_fm_vidioc_log_status,
 };
 
-static struct video_device wl1273_viddev_template = {
+static const struct video_device wl1273_viddev_template = {
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
.name   = WL1273_FM_DRIVER_NAME,
diff --git a/drivers/media/radio/si4713/radio-platform-si4713.c 
b/drivers/media/radio/si4713/radio-platform-si4713.c
index 6f93ef1..27339ec 100644
--- a/drivers/media/radio/si4713/radio-platform-si4713.c
+++ b/drivers/media/radio/si4713/radio-platform-si4713.c
@@ -135,7 +135,7 @@ static long radio_si4713_default(struct file *file, void *p,
 };
 
 /* radio_si4713_vdev_template - video device interface */
-static struct video_device radio_si4713_vdev_template = {
+static const struct video_device radio_si4713_vdev_template = {
.fops   = _si4713_fops,
.name   = "radio-si4713",
.release= video_device_release_empty,
diff --git a/drivers/media/radio/wl128x/fmdrv_v4l2.c 
b/drivers/media/radio/wl128x/fmdrv_v4l2.c
index 71423f4..fc5a7ab 100644
--- a/drivers/media/radio/wl128x/fmdrv_v4l2.c
+++ b/drivers/media/radio/wl128x/fmdrv_v4l2.c
@@ -509,7 +509,7 @@ static int fm_v4l2_vidioc_s_modulator(struct file *file, 
void *priv,
 };
 
 /* V4L2 RADIO device parent structure */
-static struct video_device fm_viddev_template = {
+static const struct video_device fm_viddev_template = {
.fops = _drv_fops,
.ioctl_ops = _drv_ioctl_ops,
.name = FM_DRV_NAME,
-- 
1.9.1



[PATCH 01/10] [media] cx88: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only passed to the const argument of the
function cx88_vdev_init.

Signed-off-by: Bhumika Goyal 
---
 drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/cx88/cx88-blackbird.c 
b/drivers/media/pci/cx88/cx88-blackbird.c
index aa49c95..e3101f0 100644
--- a/drivers/media/pci/cx88/cx88-blackbird.c
+++ b/drivers/media/pci/cx88/cx88-blackbird.c
@@ -1075,7 +1075,7 @@ static int vidioc_s_std(struct file *file, void *priv, 
v4l2_std_id id)
.vidioc_unsubscribe_event= v4l2_event_unsubscribe,
 };
 
-static struct video_device cx8802_mpeg_template = {
+static const struct video_device cx8802_mpeg_template = {
.name = "cx8802",
.fops = _fops,
.ioctl_ops= _ioctl_ops,
-- 
1.9.1



[PATCH 00/10] [media] platform: make video_device const

2017-08-26 Thread Bhumika Goyal
Make make video_device const.

Bhumika Goyal (10):
  [media] cx88: make video_device const
  [media] dt3155: make video_device const
  [media]: marvell-ccic: make video_device const
  [media] mx2-emmaprp: make video_device const
  [media]: s5p-g2d: make video_device const
  [media]: ti-vpe:  make video_device const
  [media] via-camera: make video_device const
  [media]: fsl-viu: make video_device const
  [media] m2m-deinterlace: make video_device const
  [media] vim2m: make video_device const

 drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
 drivers/media/pci/dt3155/dt3155.c   | 2 +-
 drivers/media/platform/fsl-viu.c| 2 +-
 drivers/media/platform/m2m-deinterlace.c| 2 +-
 drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
 drivers/media/platform/mx2_emmaprp.c| 2 +-
 drivers/media/platform/s5p-g2d/g2d.c| 2 +-
 drivers/media/platform/ti-vpe/cal.c | 2 +-
 drivers/media/platform/ti-vpe/vpe.c | 2 +-
 drivers/media/platform/via-camera.c | 2 +-
 drivers/media/platform/vim2m.c  | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

-- 
1.9.1



[PATCH v4 5/7] media: open.rst: Adjust some terms to match the glossary

2017-08-26 Thread Mauro Carvalho Chehab
As we now have a glossary, some terms used on open.rst
require adjustments.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/v4l/open.rst | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/media/uapi/v4l/open.rst 
b/Documentation/media/uapi/v4l/open.rst
index 51acb8de8ba8..64b1de047b1b 100644
--- a/Documentation/media/uapi/v4l/open.rst
+++ b/Documentation/media/uapi/v4l/open.rst
@@ -147,7 +147,7 @@ Related Devices
 Devices can support several functions. For example video capturing, VBI
 capturing and radio support.
 
-The V4L2 API creates different nodes for each of these functions.
+The V4L2 API creates different V4L2 device nodes for each of these functions.
 
 The V4L2 API was designed with the idea that one device node could
 support all functions. However, in practice this never worked: this
@@ -157,17 +157,17 @@ switching a device node between different functions only 
works when
 using the streaming I/O API, not with the
 :ref:`read() `/\ :ref:`write() ` API.
 
-Today each device node supports just one function.
+Today each V4L2 device node supports just one function.
 
 Besides video input or output the hardware may also support audio
 sampling or playback. If so, these functions are implemented as ALSA PCM
 devices with optional ALSA audio mixer devices.
 
 One problem with all these devices is that the V4L2 API makes no
-provisions to find these related devices. Some really complex devices
-use the Media Controller (see :ref:`media_controller`) which can be
-used for this purpose. But most drivers do not use it, and while some
-code exists that uses sysfs to discover related devices (see
+provisions to find these related V4L2 device nodes. Some really complex
+hardware use the Media Controller (see :ref:`media_controller`) which can
+be used for this purpose. But several drivers do not use it, and while some
+code exists that uses sysfs to discover related V4L2 device nodes (see
 libmedia_dev in the
 `v4l-utils `__ git
 repository), there is no library yet that can provide a single API
-- 
2.13.3



[PATCH v4 7/7] media: open.rst: add a notice about subdev-API on vdev-centric

2017-08-26 Thread Mauro Carvalho Chehab
The documentation doesn't mention if vdev-centric hardware
control would have subdev API or not.

Add a notice about that, reflecting the current status, where
three drivers use it, in order to support some subdev-specific
controls.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/uapi/v4l/open.rst | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/media/uapi/v4l/open.rst 
b/Documentation/media/uapi/v4l/open.rst
index d0930fc170f0..48f628bbabc7 100644
--- a/Documentation/media/uapi/v4l/open.rst
+++ b/Documentation/media/uapi/v4l/open.rst
@@ -46,6 +46,13 @@ the periferal can be used. For such devices, the 
sub-devices' configuration
 can be controlled via the :ref:`sub-device API `, which creates one
 device node per sub-device.
 
+.. note::
+
+   A **vdev-centric** may also optionally expose V4L2 sub-devices via
+   :ref:`sub-device API `. In that case, it has to implement
+   the :ref:`media controller API ` as well.
+
+
 .. attention::
 
Devices that require **mc-centric** hardware peripheral control should
-- 
2.13.3



Re: [PATCH 00/10] [media] platform: make video_device const

2017-08-26 Thread Mauro Carvalho Chehab
Em Sat, 26 Aug 2017 17:42:34 +0530
Bhumika Goyal  escreveu:

> On Sat, Aug 26, 2017 at 5:29 PM, Mauro Carvalho Chehab
>  wrote:
> > Em Sat, 26 Aug 2017 15:50:02 +0530
> > Bhumika Goyal  escreveu:
> >  
> >> Make make video_device const.
> >>
> >> Bhumika Goyal (10):
> >>   [media] cx88: make video_device const
> >>   [media] dt3155: make video_device const
> >>   [media]: marvell-ccic: make video_device const
> >>   [media] mx2-emmaprp: make video_device const
> >>   [media]: s5p-g2d: make video_device const
> >>   [media]: ti-vpe:  make video_device const
> >>   [media] via-camera: make video_device const
> >>   [media]: fsl-viu: make video_device const
> >>   [media] m2m-deinterlace: make video_device const
> >>   [media] vim2m: make video_device const
> >>
> >>  drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
> >>  drivers/media/pci/dt3155/dt3155.c   | 2 +-
> >>  drivers/media/platform/fsl-viu.c| 2 +-
> >>  drivers/media/platform/m2m-deinterlace.c| 2 +-
> >>  drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
> >>  drivers/media/platform/mx2_emmaprp.c| 2 +-
> >>  drivers/media/platform/s5p-g2d/g2d.c| 2 +-
> >>  drivers/media/platform/ti-vpe/cal.c | 2 +-
> >>  drivers/media/platform/ti-vpe/vpe.c | 2 +-
> >>  drivers/media/platform/via-camera.c | 2 +-
> >>  drivers/media/platform/vim2m.c  | 2 +-  
> >
> > Please, don't do one such cleanup patch per file. Instead, group
> > it per subdirectory, e. g. on e patch for:
> > drivers/media/platform/
> >
> > and another one for:
> > drivers/media/pci/
> >
> > That makes a lot easier to review and apply.
> >  
> 
> Okay, I will keep this in mind. Should I send a v2 for both the series?

Yes, please.

Thanks,
Mauro


[PATCH v2] [media] pci: make video_device const

2017-08-26 Thread Bhumika Goyal
Make these const as they are either used during a copy operation or
passed to a const argument of the function cx88_vdev_init.

Signed-off-by: Bhumika Goyal 
---
* Combine the patch series sent for drivers/media/pci/ into a
single patch.

 drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
 drivers/media/pci/dt3155/dt3155.c   | 2 +-
 drivers/media/pci/meye/meye.c   | 2 +-
 drivers/media/pci/saa7134/saa7134-empress.c | 2 +-
 drivers/media/pci/solo6x10/solo6x10-v4l2.c  | 2 +-
 drivers/media/pci/sta2x11/sta2x11_vip.c | 2 +-
 drivers/media/pci/tw68/tw68-video.c | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/media/pci/cx88/cx88-blackbird.c 
b/drivers/media/pci/cx88/cx88-blackbird.c
index aa49c95..e3101f0 100644
--- a/drivers/media/pci/cx88/cx88-blackbird.c
+++ b/drivers/media/pci/cx88/cx88-blackbird.c
@@ -1075,7 +1075,7 @@ static int vidioc_s_std(struct file *file, void *priv, 
v4l2_std_id id)
.vidioc_unsubscribe_event= v4l2_event_unsubscribe,
 };
 
-static struct video_device cx8802_mpeg_template = {
+static const struct video_device cx8802_mpeg_template = {
.name = "cx8802",
.fops = _fops,
.ioctl_ops= _ioctl_ops,
diff --git a/drivers/media/pci/dt3155/dt3155.c 
b/drivers/media/pci/dt3155/dt3155.c
index 6a21969..1775c36 100644
--- a/drivers/media/pci/dt3155/dt3155.c
+++ b/drivers/media/pci/dt3155/dt3155.c
@@ -499,7 +499,7 @@ static int dt3155_init_board(struct dt3155_priv *pd)
return 0;
 }
 
-static struct video_device dt3155_vdev = {
+static const struct video_device dt3155_vdev = {
.name = DT3155_NAME,
.fops = _fops,
.ioctl_ops = _ioctl_ops,
diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c
index 0fe76be..49e047e 100644
--- a/drivers/media/pci/meye/meye.c
+++ b/drivers/media/pci/meye/meye.c
@@ -1533,7 +1533,7 @@ static int meye_mmap(struct file *file, struct 
vm_area_struct *vma)
.vidioc_default = vidioc_default,
 };
 
-static struct video_device meye_template = {
+static const struct video_device meye_template = {
.name   = "meye",
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
diff --git a/drivers/media/pci/saa7134/saa7134-empress.c 
b/drivers/media/pci/saa7134/saa7134-empress.c
index b1d3648..66acfd3 100644
--- a/drivers/media/pci/saa7134/saa7134-empress.c
+++ b/drivers/media/pci/saa7134/saa7134-empress.c
@@ -205,7 +205,7 @@ static int empress_try_fmt_vid_cap(struct file *file, void 
*priv,
 
 /* --- */
 
-static struct video_device saa7134_empress_template = {
+static const struct video_device saa7134_empress_template = {
.name  = "saa7134-empress",
.fops  = _fops,
.ioctl_ops = _ioctl_ops,
diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2.c 
b/drivers/media/pci/solo6x10/solo6x10-v4l2.c
index 3266fc2..99ffd1e 100644
--- a/drivers/media/pci/solo6x10/solo6x10-v4l2.c
+++ b/drivers/media/pci/solo6x10/solo6x10-v4l2.c
@@ -630,7 +630,7 @@ static int solo_s_ctrl(struct v4l2_ctrl *ctrl)
.vidioc_unsubscribe_event   = v4l2_event_unsubscribe,
 };
 
-static struct video_device solo_v4l2_template = {
+static const struct video_device solo_v4l2_template = {
.name   = SOLO6X10_NAME,
.fops   = _v4l2_fops,
.ioctl_ops  = _v4l2_ioctl_ops,
diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c 
b/drivers/media/pci/sta2x11/sta2x11_vip.c
index 6343d24..eb5a9ea 100644
--- a/drivers/media/pci/sta2x11/sta2x11_vip.c
+++ b/drivers/media/pci/sta2x11/sta2x11_vip.c
@@ -754,7 +754,7 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void 
*priv,
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 };
 
-static struct video_device video_dev_template = {
+static const struct video_device video_dev_template = {
.name = KBUILD_MODNAME,
.release = video_device_release_empty,
.fops = _fops,
diff --git a/drivers/media/pci/tw68/tw68-video.c 
b/drivers/media/pci/tw68/tw68-video.c
index 58c4dd7..8c1f4a0 100644
--- a/drivers/media/pci/tw68/tw68-video.c
+++ b/drivers/media/pci/tw68/tw68-video.c
@@ -916,7 +916,7 @@ static int vidioc_s_register(struct file *file, void *priv,
 #endif
 };
 
-static struct video_device tw68_video_template = {
+static const struct video_device tw68_video_template = {
.name   = "tw68_video",
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
-- 
1.9.1



Re: [GIT PULL FOR v4.14] v2: More constify, some fixes

2017-08-26 Thread Mauro Carvalho Chehab
Em Wed, 23 Aug 2017 16:48:25 +0200
Hans Verkuil  escreveu:

> Hi Mauro,
> 
> Some more constify stuff and some fixes. The vb2 patch required to fix a
> venus bug is the most interesting change here.
> 
> I tried the -p flag for this pull request. I'm not convinced how useful it
> is since it doesn't include the commit logs.

I really liked it :-) I can quickly check if the patchset is ok, even
before pulling all patches ;)

Ok, if the number of changed lines were too big, then it would not
be productive, but with patches like that, IMHO, it helps.

Regards,
Mauro

> 
> Regards,
> 
>   Hans
> 
> Change since the v1 pull request (marked that as superseded):
> 
> Added fix "media: venus: venc: set correct resolution on compressed stream"
> (with a CC to stable for 4.13)
> 
> 
> The following changes since commit 0779b8855c746c90b85bfe6e16d5dfa2a6a46655:
> 
>   media: ddbridge: fix semicolon.cocci warnings (2017-08-20 10:25:22 -0400)
> 
> are available in the git repository at:
> 
>   git://linuxtv.org/hverkuil/media_tree.git for-v4.14k
> 
> for you to fetch changes up to 373ad449f9d3ad8a9c701034920a43f71885c98b:
> 
>   venus: fix copy/paste error in return_buf_error (2017-08-23 16:45:47 +0200)
> 
> 
> Arvind Yadav (3):
>   saa7146: constify videobuf_queue_ops structures
>   pci: constify videobuf_queue_ops structures
>   platform: constify videobuf_queue_ops structures
> 
> Bhumika Goyal (2):
>   bt8xx: Make i2c_algo_bit_data const
>   cx18: Make i2c_algo_bit_data const
> 
> Colin Ian King (1):
>   em28xx: calculate left volume level correctly
> 
> Gustavo A. R. Silva (1):
>   venus: fix copy/paste error in return_buf_error
> 
> Stanimir Varbanov (2):
>   media: vb2: add bidirectional flag in vb2_queue
>   media: venus: venc: set correct resolution on compressed stream
> 
>  drivers/media/common/saa7146/saa7146_vbi.c |  2 +-
>  drivers/media/common/saa7146/saa7146_video.c   |  2 +-
>  drivers/media/pci/bt8xx/bttv-driver.c  |  2 +-
>  drivers/media/pci/bt8xx/bttv-i2c.c |  2 +-
>  drivers/media/pci/cx18/cx18-i2c.c  |  2 +-
>  drivers/media/platform/davinci/vpfe_capture.c  |  2 +-
>  drivers/media/platform/fsl-viu.c   |  2 +-
>  drivers/media/platform/qcom/venus/helpers.c|  2 +-
>  drivers/media/platform/qcom/venus/venc.c   |  8 +---
>  drivers/media/usb/em28xx/em28xx-audio.c|  2 +-
>  drivers/media/v4l2-core/videobuf2-core.c   | 17 -
>  drivers/media/v4l2-core/videobuf2-dma-contig.c |  3 ++-
>  drivers/media/v4l2-core/videobuf2-dma-sg.c |  6 --
>  drivers/media/v4l2-core/videobuf2-vmalloc.c|  6 --
>  include/media/videobuf2-core.h | 13 +
>  15 files changed, 45 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/media/common/saa7146/saa7146_vbi.c 
> b/drivers/media/common/saa7146/saa7146_vbi.c
> index 3553ac4cba5c..d79e4d7ecd9f 100644
> --- a/drivers/media/common/saa7146/saa7146_vbi.c
> +++ b/drivers/media/common/saa7146/saa7146_vbi.c
> @@ -308,7 +308,7 @@ static void buffer_release(struct videobuf_queue *q, 
> struct videobuf_buffer *vb)
>   saa7146_dma_free(dev,q,buf);
>  }
> 
> -static struct videobuf_queue_ops vbi_qops = {
> +static const struct videobuf_queue_ops vbi_qops = {
>   .buf_setup= buffer_setup,
>   .buf_prepare  = buffer_prepare,
>   .buf_queue= buffer_queue,
> diff --git a/drivers/media/common/saa7146/saa7146_video.c 
> b/drivers/media/common/saa7146/saa7146_video.c
> index b3b29d4f36ed..37b4654dc21c 100644
> --- a/drivers/media/common/saa7146/saa7146_video.c
> +++ b/drivers/media/common/saa7146/saa7146_video.c
> @@ -1187,7 +1187,7 @@ static void buffer_release(struct videobuf_queue *q, 
> struct videobuf_buffer *vb)
>   release_all_pagetables(dev, buf);
>  }
> 
> -static struct videobuf_queue_ops video_qops = {
> +static const struct videobuf_queue_ops video_qops = {
>   .buf_setup= buffer_setup,
>   .buf_prepare  = buffer_prepare,
>   .buf_queue= buffer_queue,
> diff --git a/drivers/media/pci/bt8xx/bttv-driver.c 
> b/drivers/media/pci/bt8xx/bttv-driver.c
> index 40110be4e986..227086a2e99c 100644
> --- a/drivers/media/pci/bt8xx/bttv-driver.c
> +++ b/drivers/media/pci/bt8xx/bttv-driver.c
> @@ -1702,7 +1702,7 @@ static void buffer_release(struct videobuf_queue *q, 
> struct videobuf_buffer *vb)
>   bttv_dma_free(q,fh->btv,buf);
>  }
> 
> -static struct videobuf_queue_ops bttv_video_qops = {
> +static const struct videobuf_queue_ops bttv_video_qops = {
>   .buf_setup= buffer_setup,
>   .buf_prepare  = buffer_prepare,
>   .buf_queue= buffer_queue,
> diff --git a/drivers/media/pci/bt8xx/bttv-i2c.c 
> b/drivers/media/pci/bt8xx/bttv-i2c.c
> index 274fd036b306..eccd1e3d717a 100644
> --- a/drivers/media/pci/bt8xx/bttv-i2c.c
> +++ b/drivers/media/pci/bt8xx/bttv-i2c.c
> @@ 

[PATCH v2] [media] platform: make video_device const

2017-08-26 Thread Bhumika Goyal
Make these const as they are only used during a copy operation.
Done using Coccinelle:

@match disable optional_qualifier@
identifier s;
@@
static struct video_device s = {...};

@ref@
position p;
identifier match.s;
@@
s@p

@good1@
identifier match.s;
expression list[3] es;
position ref.p;
@@
cx88_vdev_init(es,@p,...)

@good2@
position ref.p;
identifier match.s,f,c;
expression e;
@@
(
e = s@p
|
e = s@p.f
|
c(...,s@p.f,...)
|
c(...,s@p,...)
)

@bad depends on  !good1 && !good2@
position ref.p;
identifier match.s;
@@
s@p

@depends on forall !bad disable optional_qualifier@
identifier match.s;
@@
static
+ const
struct video_device s;

Signed-off-by: Bhumika Goyal 
---
Changes in v2:
* Combine the patch series sent for drivers/media/platform/ into a 
single patch.

 drivers/media/platform/fsl-viu.c| 2 +-
 drivers/media/platform/m2m-deinterlace.c| 2 +-
 drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
 drivers/media/platform/mx2_emmaprp.c| 2 +-
 drivers/media/platform/s5p-g2d/g2d.c| 2 +-
 drivers/media/platform/ti-vpe/cal.c | 2 +-
 drivers/media/platform/ti-vpe/vpe.c | 2 +-
 drivers/media/platform/via-camera.c | 2 +-
 drivers/media/platform/vim2m.c  | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c
index f7b88e5..b3b91cb 100644
--- a/drivers/media/platform/fsl-viu.c
+++ b/drivers/media/platform/fsl-viu.c
@@ -1380,7 +1380,7 @@ static int viu_mmap(struct file *file, struct 
vm_area_struct *vma)
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 };
 
-static struct video_device viu_template = {
+static const struct video_device viu_template = {
.name   = "FSL viu",
.fops   = _fops,
.minor  = -1,
diff --git a/drivers/media/platform/m2m-deinterlace.c 
b/drivers/media/platform/m2m-deinterlace.c
index 98f6db2..c8a1249 100644
--- a/drivers/media/platform/m2m-deinterlace.c
+++ b/drivers/media/platform/m2m-deinterlace.c
@@ -979,7 +979,7 @@ static int deinterlace_mmap(struct file *file, struct 
vm_area_struct *vma)
.mmap   = deinterlace_mmap,
 };
 
-static struct video_device deinterlace_videodev = {
+static const struct video_device deinterlace_videodev = {
.name   = MEM2MEM_NAME,
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c 
b/drivers/media/platform/marvell-ccic/mcam-core.c
index 8cac2f2..b07a251 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -1639,7 +1639,7 @@ static int mcam_v4l_release(struct file *filp)
  * This template device holds all of those v4l2 methods; we
  * clone it for specific real devices.
  */
-static struct video_device mcam_v4l_template = {
+static const struct video_device mcam_v4l_template = {
.name = "mcam",
.fops = _v4l_fops,
.ioctl_ops = _v4l_ioctl_ops,
diff --git a/drivers/media/platform/mx2_emmaprp.c 
b/drivers/media/platform/mx2_emmaprp.c
index 7fd209e..3493d40 100644
--- a/drivers/media/platform/mx2_emmaprp.c
+++ b/drivers/media/platform/mx2_emmaprp.c
@@ -873,7 +873,7 @@ static int emmaprp_mmap(struct file *file, struct 
vm_area_struct *vma)
.mmap   = emmaprp_mmap,
 };
 
-static struct video_device emmaprp_videodev = {
+static const struct video_device emmaprp_videodev = {
.name   = MEM2MEM_NAME,
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
diff --git a/drivers/media/platform/s5p-g2d/g2d.c 
b/drivers/media/platform/s5p-g2d/g2d.c
index bd655b5..66aa8cf 100644
--- a/drivers/media/platform/s5p-g2d/g2d.c
+++ b/drivers/media/platform/s5p-g2d/g2d.c
@@ -602,7 +602,7 @@ static irqreturn_t g2d_isr(int irq, void *prv)
.vidioc_cropcap = vidioc_cropcap,
 };
 
-static struct video_device g2d_videodev = {
+static const struct video_device g2d_videodev = {
.name   = G2D_NAME,
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
diff --git a/drivers/media/platform/ti-vpe/cal.c 
b/drivers/media/platform/ti-vpe/cal.c
index 0c7ddf8..42e383a 100644
--- a/drivers/media/platform/ti-vpe/cal.c
+++ b/drivers/media/platform/ti-vpe/cal.c
@@ -1420,7 +1420,7 @@ static void cal_stop_streaming(struct vb2_queue *vq)
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 };
 
-static struct video_device cal_videodev = {
+static const struct video_device cal_videodev = {
.name   = CAL_MODULE_NAME,
.fops   = _fops,
.ioctl_ops  = _ioctl_ops,
diff --git a/drivers/media/platform/ti-vpe/vpe.c 
b/drivers/media/platform/ti-vpe/vpe.c
index 2873c22..45bd105 100644
--- a/drivers/media/platform/ti-vpe/vpe.c
+++ b/drivers/media/platform/ti-vpe/vpe.c
@@ -2421,7 +2421,7 @@ static int 

Re: [PATCH v2] [media] usb: make video_device const

2017-08-26 Thread isely

Acked-by: Mike Isely 

  -Mike


On Sat, 26 Aug 2017, Bhumika Goyal wrote:

> Make these const as they are only used during a copy operation.
> 
> Signed-off-by: Bhumika Goyal 
> ---
> Changes in v2:
> * Combine the patch series sent for drivers/media/usb/ into a
> single patch.
> 
>  drivers/media/usb/airspy/airspy.c| 2 +-
>  drivers/media/usb/cpia2/cpia2_v4l.c  | 2 +-
>  drivers/media/usb/go7007/go7007-v4l2.c   | 2 +-
>  drivers/media/usb/hackrf/hackrf.c| 2 +-
>  drivers/media/usb/msi2500/msi2500.c  | 2 +-
>  drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 2 +-
>  drivers/media/usb/pwc/pwc-if.c   | 2 +-
>  drivers/media/usb/s2255/s2255drv.c   | 2 +-
>  drivers/media/usb/stk1160/stk1160-v4l.c  | 2 +-
>  drivers/media/usb/stkwebcam/stk-webcam.c | 2 +-
>  drivers/media/usb/zr364xx/zr364xx.c  | 2 +-
>  11 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/media/usb/airspy/airspy.c 
> b/drivers/media/usb/airspy/airspy.c
> index 07f3f4e..e70c9e2 100644
> --- a/drivers/media/usb/airspy/airspy.c
> +++ b/drivers/media/usb/airspy/airspy.c
> @@ -859,7 +859,7 @@ static int airspy_enum_freq_bands(struct file *file, void 
> *priv,
>   .unlocked_ioctl   = video_ioctl2,
>  };
>  
> -static struct video_device airspy_template = {
> +static const struct video_device airspy_template = {
>   .name = "AirSpy SDR",
>   .release  = video_device_release_empty,
>   .fops = _fops,
> diff --git a/drivers/media/usb/cpia2/cpia2_v4l.c 
> b/drivers/media/usb/cpia2/cpia2_v4l.c
> index 7122023..3dedd83 100644
> --- a/drivers/media/usb/cpia2/cpia2_v4l.c
> +++ b/drivers/media/usb/cpia2/cpia2_v4l.c
> @@ -1075,7 +1075,7 @@ static void reset_camera_struct_v4l(struct camera_data 
> *cam)
>   .mmap   = cpia2_mmap,
>  };
>  
> -static struct video_device cpia2_template = {
> +static const struct video_device cpia2_template = {
>   /* I could not find any place for the old .initialize initializer?? */
>   .name = "CPiA2 Camera",
>   .fops = _fops,
> diff --git a/drivers/media/usb/go7007/go7007-v4l2.c 
> b/drivers/media/usb/go7007/go7007-v4l2.c
> index 445f17b..98cd57e 100644
> --- a/drivers/media/usb/go7007/go7007-v4l2.c
> +++ b/drivers/media/usb/go7007/go7007-v4l2.c
> @@ -901,7 +901,7 @@ static int go7007_s_ctrl(struct v4l2_ctrl *ctrl)
>   .vidioc_unsubscribe_event = v4l2_event_unsubscribe,
>  };
>  
> -static struct video_device go7007_template = {
> +static const struct video_device go7007_template = {
>   .name   = "go7007",
>   .fops   = _fops,
>   .release= video_device_release_empty,
> diff --git a/drivers/media/usb/hackrf/hackrf.c 
> b/drivers/media/usb/hackrf/hackrf.c
> index a41b305..7eb5351 100644
> --- a/drivers/media/usb/hackrf/hackrf.c
> +++ b/drivers/media/usb/hackrf/hackrf.c
> @@ -1263,7 +1263,7 @@ static int hackrf_enum_freq_bands(struct file *file, 
> void *priv,
>   .unlocked_ioctl   = video_ioctl2,
>  };
>  
> -static struct video_device hackrf_template = {
> +static const struct video_device hackrf_template = {
>   .name = "HackRF One",
>   .release  = video_device_release_empty,
>   .fops = _fops,
> diff --git a/drivers/media/usb/msi2500/msi2500.c 
> b/drivers/media/usb/msi2500/msi2500.c
> index 79bfd2d..a097d3d 100644
> --- a/drivers/media/usb/msi2500/msi2500.c
> +++ b/drivers/media/usb/msi2500/msi2500.c
> @@ -1143,7 +1143,7 @@ static int msi2500_enum_freq_bands(struct file *file, 
> void *priv,
>   .unlocked_ioctl   = video_ioctl2,
>  };
>  
> -static struct video_device msi2500_template = {
> +static const struct video_device msi2500_template = {
>   .name = "Mirics MSi3101 SDR Dongle",
>   .release  = video_device_release_empty,
>   .fops = _fops,
> diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c 
> b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
> index 8f13c60..4320bda 100644
> --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
> +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
> @@ -1226,7 +1226,7 @@ static unsigned int pvr2_v4l2_poll(struct file *file, 
> poll_table *wait)
>  };
>  
>  
> -static struct video_device vdev_template = {
> +static const struct video_device vdev_template = {
>   .fops   = _fops,
>  };
>  
> diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
> index 22420c1..eb6921d 100644
> --- a/drivers/media/usb/pwc/pwc-if.c
> +++ b/drivers/media/usb/pwc/pwc-if.c
> @@ -146,7 +146,7 @@
>   .mmap = vb2_fop_mmap,
>   .unlocked_ioctl = video_ioctl2,
>  };
> -static struct video_device pwc_template = {
> +static const struct video_device pwc_template = {
>   .name = "Philips Webcam",   /* Filled in later */
>   .release =  

[PATCH v2] [media] usb: make video_device const

2017-08-26 Thread Bhumika Goyal
Make these const as they are only used during a copy operation.

Signed-off-by: Bhumika Goyal 
---
Changes in v2:
* Combine the patch series sent for drivers/media/usb/ into a
single patch.

 drivers/media/usb/airspy/airspy.c| 2 +-
 drivers/media/usb/cpia2/cpia2_v4l.c  | 2 +-
 drivers/media/usb/go7007/go7007-v4l2.c   | 2 +-
 drivers/media/usb/hackrf/hackrf.c| 2 +-
 drivers/media/usb/msi2500/msi2500.c  | 2 +-
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 2 +-
 drivers/media/usb/pwc/pwc-if.c   | 2 +-
 drivers/media/usb/s2255/s2255drv.c   | 2 +-
 drivers/media/usb/stk1160/stk1160-v4l.c  | 2 +-
 drivers/media/usb/stkwebcam/stk-webcam.c | 2 +-
 drivers/media/usb/zr364xx/zr364xx.c  | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/media/usb/airspy/airspy.c 
b/drivers/media/usb/airspy/airspy.c
index 07f3f4e..e70c9e2 100644
--- a/drivers/media/usb/airspy/airspy.c
+++ b/drivers/media/usb/airspy/airspy.c
@@ -859,7 +859,7 @@ static int airspy_enum_freq_bands(struct file *file, void 
*priv,
.unlocked_ioctl   = video_ioctl2,
 };
 
-static struct video_device airspy_template = {
+static const struct video_device airspy_template = {
.name = "AirSpy SDR",
.release  = video_device_release_empty,
.fops = _fops,
diff --git a/drivers/media/usb/cpia2/cpia2_v4l.c 
b/drivers/media/usb/cpia2/cpia2_v4l.c
index 7122023..3dedd83 100644
--- a/drivers/media/usb/cpia2/cpia2_v4l.c
+++ b/drivers/media/usb/cpia2/cpia2_v4l.c
@@ -1075,7 +1075,7 @@ static void reset_camera_struct_v4l(struct camera_data 
*cam)
.mmap   = cpia2_mmap,
 };
 
-static struct video_device cpia2_template = {
+static const struct video_device cpia2_template = {
/* I could not find any place for the old .initialize initializer?? */
.name = "CPiA2 Camera",
.fops = _fops,
diff --git a/drivers/media/usb/go7007/go7007-v4l2.c 
b/drivers/media/usb/go7007/go7007-v4l2.c
index 445f17b..98cd57e 100644
--- a/drivers/media/usb/go7007/go7007-v4l2.c
+++ b/drivers/media/usb/go7007/go7007-v4l2.c
@@ -901,7 +901,7 @@ static int go7007_s_ctrl(struct v4l2_ctrl *ctrl)
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 };
 
-static struct video_device go7007_template = {
+static const struct video_device go7007_template = {
.name   = "go7007",
.fops   = _fops,
.release= video_device_release_empty,
diff --git a/drivers/media/usb/hackrf/hackrf.c 
b/drivers/media/usb/hackrf/hackrf.c
index a41b305..7eb5351 100644
--- a/drivers/media/usb/hackrf/hackrf.c
+++ b/drivers/media/usb/hackrf/hackrf.c
@@ -1263,7 +1263,7 @@ static int hackrf_enum_freq_bands(struct file *file, void 
*priv,
.unlocked_ioctl   = video_ioctl2,
 };
 
-static struct video_device hackrf_template = {
+static const struct video_device hackrf_template = {
.name = "HackRF One",
.release  = video_device_release_empty,
.fops = _fops,
diff --git a/drivers/media/usb/msi2500/msi2500.c 
b/drivers/media/usb/msi2500/msi2500.c
index 79bfd2d..a097d3d 100644
--- a/drivers/media/usb/msi2500/msi2500.c
+++ b/drivers/media/usb/msi2500/msi2500.c
@@ -1143,7 +1143,7 @@ static int msi2500_enum_freq_bands(struct file *file, 
void *priv,
.unlocked_ioctl   = video_ioctl2,
 };
 
-static struct video_device msi2500_template = {
+static const struct video_device msi2500_template = {
.name = "Mirics MSi3101 SDR Dongle",
.release  = video_device_release_empty,
.fops = _fops,
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c 
b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
index 8f13c60..4320bda 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
@@ -1226,7 +1226,7 @@ static unsigned int pvr2_v4l2_poll(struct file *file, 
poll_table *wait)
 };
 
 
-static struct video_device vdev_template = {
+static const struct video_device vdev_template = {
.fops   = _fops,
 };
 
diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
index 22420c1..eb6921d 100644
--- a/drivers/media/usb/pwc/pwc-if.c
+++ b/drivers/media/usb/pwc/pwc-if.c
@@ -146,7 +146,7 @@
.mmap = vb2_fop_mmap,
.unlocked_ioctl = video_ioctl2,
 };
-static struct video_device pwc_template = {
+static const struct video_device pwc_template = {
.name = "Philips Webcam",   /* Filled in later */
.release =  video_device_release_empty,
.fops = _fops,
diff --git a/drivers/media/usb/s2255/s2255drv.c 
b/drivers/media/usb/s2255/s2255drv.c
index 23f606e..b2f239c 100644
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -1590,7 +1590,7 @@ static void 

Re: [PATCH 0/4] Fix problems on building documentation with Sphinx 1.6

2017-08-26 Thread Jonathan Corbet
On Sat, 26 Aug 2017 06:28:24 -0300
Mauro Carvalho Chehab  wrote:

> IMHO, the best is if I apply patch 2 on my trees. Please apply
> patches 1 and 3 on your tree.
> 
> Patch 4 can only be applied after  patch 2 gets merged, but it
> is just a cleanup patch that can be applied any time later.

OK, I've applied those two, and stashed 4 aside for later.

Thanks,

jon


[PATCH 3/3] [media] usbvision: Improve a size determination in usbvision_alloc()

2017-08-26 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 26 Aug 2017 22:22:13 +0200

Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 drivers/media/usb/usbvision/usbvision-video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/usbvision/usbvision-video.c 
b/drivers/media/usb/usbvision/usbvision-video.c
index e6807bad9792..960272d3c924 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -1319,7 +1319,7 @@ static struct usb_usbvision *usbvision_alloc(struct 
usb_device *dev,
 {
struct usb_usbvision *usbvision;
 
-   usbvision = kzalloc(sizeof(struct usb_usbvision), GFP_KERNEL);
+   usbvision = kzalloc(sizeof(*usbvision), GFP_KERNEL);
if (!usbvision)
return NULL;
 
-- 
2.14.0



[PATCH 0/3] [media] usbvision: Adjustments for six function implementations

2017-08-26 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 26 Aug 2017 22:36:54 +0200

A few update suggestions were taken into account
from static source code analysis.

Markus Elfring (3):
  Delete an error message for a failed memory allocation in usbvision_probe()
  Adjust eight checks for null pointers
  Improve a size determination in usbvision_alloc()

 drivers/media/usb/usbvision/usbvision-video.c | 19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

-- 
2.14.0



[PATCH 1/3] [media] usbvision: Delete an error message for a failed memory allocation in usbvision_probe()

2017-08-26 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 26 Aug 2017 22:06:05 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 drivers/media/usb/usbvision/usbvision-video.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/usb/usbvision/usbvision-video.c 
b/drivers/media/usb/usbvision/usbvision-video.c
index 756322c4ac05..b74fb2dcb6f5 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -1498,4 +1498,3 @@ static int usbvision_probe(struct usb_interface *intf,
-   dev_err(>dev, "usbvision: out of memory!\n");
ret = -ENOMEM;
goto err_pkt;
}
-- 
2.14.0



[PATCH 2/3] [media] usbvision: Adjust eight checks for null pointers

2017-08-26 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 26 Aug 2017 22:16:52 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The script “checkpatch.pl” pointed information out like the following.

Comparison to NULL could be written !…

Thus fix the affected source code places.

Signed-off-by: Markus Elfring 
---
 drivers/media/usb/usbvision/usbvision-video.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/media/usb/usbvision/usbvision-video.c 
b/drivers/media/usb/usbvision/usbvision-video.c
index b74fb2dcb6f5..e6807bad9792 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -904,7 +904,7 @@ static ssize_t usbvision_read(struct file *file, char 
__user *buf,
PDEBUG(DBG_IO, "%s: %ld bytes, noblock=%d", __func__,
   (unsigned long)count, noblock);
 
-   if (!USBVISION_IS_OPERATIONAL(usbvision) || (buf == NULL))
+   if (!USBVISION_IS_OPERATIONAL(usbvision) || !buf)
return -EFAULT;
 
/* This entry point is compatible with the mmap routines
@@ -1234,7 +1234,7 @@ static void usbvision_vdev_init(struct usb_usbvision 
*usbvision,
 {
struct usb_device *usb_dev = usbvision->dev;
 
-   if (usb_dev == NULL) {
+   if (!usb_dev) {
dev_err(>dev->dev,
"%s: usbvision->dev is not set\n", __func__);
return;
@@ -1323,4 +1323,4 @@ static struct usb_usbvision *usbvision_alloc(struct 
usb_device *dev,
-   if (usbvision == NULL)
+   if (!usbvision)
return NULL;
 
usbvision->dev = dev;
@@ -1334,7 +1334,7 @@ static struct usb_usbvision *usbvision_alloc(struct 
usb_device *dev,
 
/* prepare control urb for control messages during interrupts */
usbvision->ctrl_urb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL);
-   if (usbvision->ctrl_urb == NULL)
+   if (!usbvision->ctrl_urb)
goto err_unreg;
 
return usbvision;
@@ -1380,7 +1380,7 @@ static void usbvision_configure_video(struct 
usb_usbvision *usbvision)
 {
int model;
 
-   if (usbvision == NULL)
+   if (!usbvision)
return;
 
model = usbvision->dev_model;
@@ -1474,7 +1474,7 @@ static int usbvision_probe(struct usb_interface *intf,
}
 
usbvision = usbvision_alloc(dev, intf);
-   if (usbvision == NULL) {
+   if (!usbvision) {
dev_err(>dev, "%s: couldn't allocate USBVision struct\n", 
__func__);
ret = -ENOMEM;
goto err_usb;
@@ -1494,5 +1494,5 @@ static int usbvision_probe(struct usb_interface *intf,
usbvision->num_alt = uif->num_altsetting;
PDEBUG(DBG_PROBE, "Alternate settings: %i", usbvision->num_alt);
usbvision->alt_max_pkt_size = kmalloc(32 * usbvision->num_alt, 
GFP_KERNEL);
-   if (usbvision->alt_max_pkt_size == NULL) {
+   if (!usbvision->alt_max_pkt_size) {
ret = -ENOMEM;
@@ -1565,7 +1565,7 @@ static void usbvision_disconnect(struct usb_interface 
*intf)
 
PDEBUG(DBG_PROBE, "");
 
-   if (usbvision == NULL) {
+   if (!usbvision) {
pr_err("%s: usb_get_intfdata() failed\n", __func__);
return;
}
-- 
2.14.0



[PATCH] [media] atomisp2: Remove null check before kfree

2017-08-26 Thread Himanshu Jha
Kfree on NULL pointer is a no-op and therefore checking is redundant.

Signed-off-by: Himanshu Jha 
---
 .../staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c| 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c 
b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c
index 6358216..451c76e 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c
@@ -295,10 +295,8 @@ void sh_css_unload_firmware(void)
}
 
memset(_css_sp_fw, 0, sizeof(sh_css_sp_fw));
-   if (sh_css_blob_info) {
-   kfree(sh_css_blob_info);
-   sh_css_blob_info = NULL;
-   }
+   kfree(sh_css_blob_info);
+   sh_css_blob_info = NULL;
sh_css_num_binaries = 0;
 }
 
-- 
2.7.4



[PATCH 1/1] build: gpio-ir-tx backport

2017-08-26 Thread Jasmin J.
From: Jasmin Jessich 

- Added v3.16_gpio-ir-tx.patch
- gpio_ir_tx needs 3.13. at least

Signed-off-by: Jasmin Jessich 
---
 backports/backports.txt  |  1 +
 backports/v3.16_gpio-ir-tx.patch | 25 +
 v4l/versions.txt |  1 +
 3 files changed, 27 insertions(+)
 create mode 100644 backports/v3.16_gpio-ir-tx.patch

diff --git a/backports/backports.txt b/backports/backports.txt
index 87b9ee8..22b73a8 100644
--- a/backports/backports.txt
+++ b/backports/backports.txt
@@ -83,6 +83,7 @@ add v3.17_fix_clamp.patch
 add v3.16_netdev.patch
 add v3.16_wait_on_bit.patch
 add v3.16_void_gpiochip_remove.patch
+add v3.16_gpio-ir-tx.patch
 
 [3.13.255]
 add v3.13_ddbridge_pcimsi.patch
diff --git a/backports/v3.16_gpio-ir-tx.patch b/backports/v3.16_gpio-ir-tx.patch
new file mode 100644
index 000..3ec4304
--- /dev/null
+++ b/backports/v3.16_gpio-ir-tx.patch
@@ -0,0 +1,25 @@
+diff --git a/drivers/media/rc/gpio-ir-tx.c b/drivers/media/rc/gpio-ir-tx.c
+index cd476ca..f48aba2 100644
+--- a/drivers/media/rc/gpio-ir-tx.c
 b/drivers/media/rc/gpio-ir-tx.c
+@@ -136,13 +136,19 @@ static int gpio_ir_tx_probe(struct platform_device *pdev)
+   if (!rcdev)
+   return -ENOMEM;
+ 
+-  gpio_ir->gpio = devm_gpiod_get(>dev, NULL, GPIOD_OUT_LOW);
++  gpio_ir->gpio = devm_gpiod_get(>dev, NULL);
+   if (IS_ERR(gpio_ir->gpio)) {
+   if (PTR_ERR(gpio_ir->gpio) != -EPROBE_DEFER)
+   dev_err(>dev, "Failed to get gpio (%ld)\n",
+   PTR_ERR(gpio_ir->gpio));
+   return PTR_ERR(gpio_ir->gpio);
+   }
++  rc = gpiod_direction_output(gpio_ir->gpio, 0);
++  if (!rc) {
++  dev_err(>dev, "Failed to set output direction(%d)\n", rc);
++  gpiod_put(gpio_ir->gpio);
++  return rc;
++  }
+ 
+   rcdev->priv = gpio_ir;
+   rcdev->driver_name = DRIVER_NAME;
diff --git a/v4l/versions.txt b/v4l/versions.txt
index 0c7a3b5..7c54778 100644
--- a/v4l/versions.txt
+++ b/v4l/versions.txt
@@ -97,6 +97,7 @@ VIDEO_COBALT
 [3.13.0]
 # needs gpio/consumer.h
 RADIO_SI4713
+IR_GPIO_TX
 
 [3.12.0]
 # BIN_ATTR_RW was changed
-- 
2.7.4



[PATCH 0/1] build: gpio-ir-tx for 3.13

2017-08-26 Thread Jasmin J.
From: Jasmin Jessich 

Kernel 3.17 introduces GPIOD_OUT_LOW/HIGH. gpio-ir-tx requires this
definitions. This patch adds the API calls prior to 3.17 to be used
by gpio-ir-tx.
With that gpio-ir-tx can be compiled back to Kernel 3.13.
I tested the compilation (not the functionality!) on 4.4, 3.13 and
3.4.

@Sean: Please check if the code in v3.16_gpio-ir-tx.patch looks
feasible for you (can't test this here). If not, we will drop this
patch and simply disable gpio-ir-tx for Kernels older than 3.17.

Jasmin Jessich (1):
  build: gpio-ir-tx backport

 backports/backports.txt  |  1 +
 backports/v3.16_gpio-ir-tx.patch | 27 +++
 v4l/versions.txt |  1 +
 3 files changed, 29 insertions(+)
 create mode 100644 backports/v3.16_gpio-ir-tx.patch

-- 
2.7.4



[PATCH] staging: atomisp: constify v4l2_subdev_sensor_ops

2017-08-26 Thread Arvind Yadav
v4l2_subdev_sensor_ops are not supposed to change at runtime.
v4l2_subdev_sensor_ops are working with const 'sensor' field of
sturct v4l2_subdev_ops. So mark the non-const v4l2_subdev_sensor_ops
structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/staging/media/atomisp/i2c/mt9m114.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/i2c/mt9m114.c 
b/drivers/staging/media/atomisp/i2c/mt9m114.c
index 3fa9153..2c9b752 100644
--- a/drivers/staging/media/atomisp/i2c/mt9m114.c
+++ b/drivers/staging/media/atomisp/i2c/mt9m114.c
@@ -1806,7 +1806,7 @@ static const struct v4l2_subdev_video_ops 
mt9m114_video_ops = {
.g_frame_interval = mt9m114_g_frame_interval,
 };
 
-static struct v4l2_subdev_sensor_ops mt9m114_sensor_ops = {
+static const struct v4l2_subdev_sensor_ops mt9m114_sensor_ops = {
.g_skip_frames  = mt9m114_g_skip_frames,
 };
 
-- 
2.7.4



cron job: media_tree daily build: ERRORS

2017-08-26 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for
the kernels and architectures in the list below.

Results of the daily build of media_tree:

date:   Sun Aug 27 05:00:17 CEST 2017
media-tree git hash:0b56d1c8fd8991b0ae5255151c54ed20deb49a28
media_build git hash:   4a73db0fa0115ef58537be61da6099c828f57d2b
v4l-utils git hash: 5a6e0c38468c629f3f6f4fb988acebb9e66e2917
gcc version:i686-linux-gcc (GCC) 7.1.0
sparse version: v0.5.0
smatch version: v0.5.0-3553-g78b2ea6
host hardware:  x86_64
host os:4.12.0-164

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-multi: OK
linux-git-arm-pxa: OK
linux-git-arm-stm32: OK
linux-git-blackfin-bf561: OK
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.36.4-i686: ERRORS
linux-2.6.37.6-i686: ERRORS
linux-2.6.38.8-i686: ERRORS
linux-2.6.39.4-i686: ERRORS
linux-3.0.60-i686: ERRORS
linux-3.1.10-i686: ERRORS
linux-3.2.37-i686: ERRORS
linux-3.3.8-i686: ERRORS
linux-3.4.27-i686: ERRORS
linux-3.5.7-i686: ERRORS
linux-3.6.11-i686: ERRORS
linux-3.7.4-i686: ERRORS
linux-3.8-i686: ERRORS
linux-3.9.2-i686: ERRORS
linux-3.10.1-i686: ERRORS
linux-3.11.1-i686: ERRORS
linux-3.12.67-i686: ERRORS
linux-3.13.11-i686: ERRORS
linux-3.14.9-i686: ERRORS
linux-3.15.2-i686: ERRORS
linux-3.16.7-i686: ERRORS
linux-3.17.8-i686: ERRORS
linux-3.18.7-i686: ERRORS
linux-3.19-i686: ERRORS
linux-4.0.9-i686: ERRORS
linux-4.1.33-i686: ERRORS
linux-4.2.8-i686: ERRORS
linux-4.3.6-i686: ERRORS
linux-4.4.22-i686: ERRORS
linux-4.5.7-i686: ERRORS
linux-4.6.7-i686: ERRORS
linux-4.7.5-i686: ERRORS
linux-4.8-i686: ERRORS
linux-4.9.26-i686: ERRORS
linux-4.10.14-i686: OK
linux-4.11-i686: OK
linux-4.12.1-i686: OK
linux-2.6.36.4-x86_64: ERRORS
linux-2.6.37.6-x86_64: ERRORS
linux-2.6.38.8-x86_64: ERRORS
linux-2.6.39.4-x86_64: ERRORS
linux-3.0.60-x86_64: ERRORS
linux-3.1.10-x86_64: ERRORS
linux-3.2.37-x86_64: ERRORS
linux-3.3.8-x86_64: ERRORS
linux-3.4.27-x86_64: ERRORS
linux-3.5.7-x86_64: ERRORS
linux-3.6.11-x86_64: ERRORS
linux-3.7.4-x86_64: ERRORS
linux-3.8-x86_64: ERRORS
linux-3.9.2-x86_64: ERRORS
linux-3.10.1-x86_64: ERRORS
linux-3.11.1-x86_64: ERRORS
linux-3.12.67-x86_64: ERRORS
linux-3.13.11-x86_64: ERRORS
linux-3.14.9-x86_64: ERRORS
linux-3.15.2-x86_64: ERRORS
linux-3.16.7-x86_64: ERRORS
linux-3.17.8-x86_64: ERRORS
linux-3.18.7-x86_64: ERRORS
linux-3.19-x86_64: ERRORS
linux-4.0.9-x86_64: ERRORS
linux-4.1.33-x86_64: ERRORS
linux-4.2.8-x86_64: ERRORS
linux-4.3.6-x86_64: ERRORS
linux-4.4.22-x86_64: ERRORS
linux-4.5.7-x86_64: ERRORS
linux-4.6.7-x86_64: ERRORS
linux-4.7.5-x86_64: ERRORS
linux-4.8-x86_64: ERRORS
linux-4.9.26-x86_64: ERRORS
linux-4.10.14-x86_64: WARNINGS
linux-4.11-x86_64: WARNINGS
linux-4.12.1-x86_64: WARNINGS
apps: WARNINGS
spec-git: OK

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Sunday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Sunday.tar.bz2

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/index.html