summaryrefslogtreecommitdiff
path: root/drivers/staging/media
AgeCommit message (Collapse)Author
2017-09-05media: staging: atomisp: sh_css_calloc shall return a pointer to the ↵Sergei A. Trusov
allocated space The calloc function returns either a null pointer or a pointer to the allocated space. Add the second case that is missed. Fixes: da22013f7df4 ("atomisp: remove indirection from sh_css_malloc") Signed-off-by: Sergei A. Trusov <sergei.a.trusov@ya.ru> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-27media: staging/imx: always select VIDEOBUF2_DMA_CONTIGArnd Bergmann
I ran into a rare build error during randconfig testing: drivers/staging/media/imx/imx-media-capture.o: In function `capture_stop_streaming': imx-media-capture.c:(.text+0x224): undefined reference to `vb2_buffer_done' drivers/staging/media/imx/imx-media-capture.o: In function `imx_media_capture_device_register': imx-media-capture.c:(.text+0xe60): undefined reference to `vb2_queue_init' imx-media-capture.c:(.text+0xfa0): undefined reference to `vb2_dma_contig_memops' While VIDEOBUF2_DMA_CONTIG was already selected by the camera driver, it wasn't necessarily there with just the base driver enabled. This moves the 'select' statement to the top-level option to make sure it's always available. Fixes: 64b5a49df486 ("[media] media: imx: Add Capture Device Interface") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-27media: Staging: media: radio-bcm2048: make video_device constBhumika Goyal
Make this const as it is only used in a copy operation. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-27media: staging: omap4iss: make v4l2_file_operations constBhumika Goyal
Make this const as it is only stored in a const field of a video_device structure. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-27media: imx: use setup_timerCihangir Akturk
Use setup_timer function instead of initializing timer with the function and data fields. Generated by: scripts/coccinelle/api/setup_timer.cocci. Signed-off-by: Cihangir Akturk <cakturk@gmail.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com> Tested-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-27media: staging/cxd2099: Add module parameter for buffer modeDaniel Scheller
The buffer mode of the cxd2099 driver requires more work regarding error handling and thus can cause issues in some cases, so disable it by default and make that mode of operation controllable by users via a module parameter (ie. 'modprobe cxd2099 buffermode=1' enables current behaviour). The upstream codebase also has the buffer mode disabled by default, so we should match this (but users still can test things out using the modparm). Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Signed-off-by: Jasmin Jessich <jasmin@anw.at> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-26media: staging: atomisp: fix bounds checking in mt9m114_s_exposure_selection()Dan Carpenter
These clamp_t() calls are no-ops because we don't save the results. It leads to an array out of bounds bug. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-26media: staging: media: atomisp: ap1302: Remove FSF postal addressHarold Gomez
Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL. remove the unnecessary paragraph Signed-off-by: Harold Gomez <haroldgmz11@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-26media: staging: atomisp: imx: remove dead codeArnd Bergmann
Making some functions 'static' has uncovered a few functions that have no caller, through the gcc warnings: atomisp/i2c/imx/imx.c:1111:12: error: 'imx_t_focus_vcm' defined but not used [-Werror=unused-function] atomisp/i2c/imx/imx.c:1103:12: error: 'imx_vcm_init' defined but not used [-Werror=unused-function] atomisp/i2c/imx/imx.c:1095:12: error: 'imx_vcm_power_down' defined but not used [-Werror=unused-function] atomisp/i2c/imx/imx.c:1087:12: error: 'imx_vcm_power_up' defined but not used [-Werror=unused-function] All four of these can be removed. Since they call indirect functions, I also looked at how those are used in turn: - The power_up/power_down callbacks are called from other functions and are still needed. - The t_focus_vcm callbacks pointers are completely unused and can be removed in both imx and ov8858. Some of the handlers are called directly and can now be marked static, the others are dummy implemntations that we can remove. - vcm_init is unused in imx, but dw9718_vcm_init is used in ov8858, but is not used in imx, so that one needs to stay around. The callback pointers in imx can be removed. Fixes: 9a5a6911aa3f ("staging: imx: fix non-static declarations") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: lirc_zilog: driver only sends LIRCCODESean Young
This driver cannot send pulse, it only accepts driver-dependent codes. Cc: <stable@vger.kernel.org> # v3.2 Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: lirc_zilog: Clean up lirc zilog error codesYves Lemée
According the coding style guidelines, the ENOSYS error code must be returned in case of a non existent system call. This code has been replaced with the ENOTTY error code indicating a missing functionality. Signed-off-by: Yves Lemée <yves.lemee.kernel@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: imx: capture: constify vb2_ops structuresJulia Lawall
These vb2_ops structures are only stored in the ops field of a vb2_queue structure, which is declared as const. Thus the vb2_ops structures themselves can be const. Done with the help of Coccinelle. // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct vb2_ops i@p = { ... }; @ok@ identifier r.i; struct vb2_queue e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct vb2_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct vb2_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: staging: media: davinci_vpfe: constify vb2_ops structuresJulia Lawall
These vb2_ops structures are only stored in the ops field of a vb2_queue structure, which is declared as const. Thus the vb2_ops structures themselves can be const. Done with the help of Coccinelle. // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct vb2_ops i@p = { ... }; @ok@ identifier r.i; struct vb2_queue e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct vb2_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct vb2_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-09media: staging: media: atomisp: constify video_subdev structuresJulia Lawall
These structures are both stored in fields of v4l2_subdev_ops structures, all of which are const, so these structures can be const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-09media: staging: media: atomisp: remove trailing whitespaceStephen Brennan
Signed-off-by: Stephen Brennan <stephen@brennan.io> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-09media: staging: media: atomisp: i2c: gc0310: fixed brace coding style issueRene Hickersberger
Fixed a brace coding style issue. Signed-off-by: Rene Hickersberger <renehickersberger@gmx.net> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-09media: staging: media: atomisp: constify videobuf_queue_ops structuresJulia Lawall
These videobuf_queue_ops structures are only passed as the second argument to videobuf_queue_vmalloc_init, which is declared as const. Thus the videobuf_queue_ops structures themselves can be const. Done with the help of Coccinelle. // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct videobuf_queue_ops i@p = { ... }; @ok1@ identifier r.i; expression e1; position p; @@ videobuf_queue_vmalloc_init(e1,&i@p,...) @bad@ position p != {r.p,ok1.p}; identifier r.i; struct videobuf_queue_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct videobuf_queue_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-09media: staging: media: atomisp: use kvmalloc/kvzallocGeliang Tang
Use kvmalloc()/kvzalloc() instead of atomisp_kernel_malloc() /atomisp_kernel_zalloc(). Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-08media: staging/imx: remove confusing IS_ERR_OR_NULL usageArnd Bergmann
While looking at a compiler warning, I noticed the use of IS_ERR_OR_NULL, which is generally a sign of a bad API design and should be avoided. In this driver, this is fairly easy, we can simply stop storing error pointers in persistent structures, and change the two functions that might return either a NULL pointer or an error code to consistently return error pointers when failing. of_parse_subdev() now separates the error code and the pointer it looks up, to clarify the interface. There are two cases where this function originally returns 'NULL', and I have changed that to '0' for success to keep the current behavior, though returning an error would also make sense there. Fixes: e130291212df ("[media] media: Add i.MX media core driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com> Tested-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-08media: staging: imx: fix non-static declarationsJB Van Puyvelde
Add static keywords to fix this kind of sparse warnings: warning: symbol 'imx_t_vcm_timing' was not declared. Should it be static? Signed-off-by: JB Van Puyvelde <jbvanpuyvelde@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-08media: imx: prpencvf: enable double write reductionSteve Longerbeam
For the write channels with 4:2:0 subsampled YUV formats, avoid chroma overdraw by only writing chroma for even lines. Reduces necessary write memory bandwidth by at least 25% (more with rotation enabled). Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-08media: imx: add VIDEO_V4L2_SUBDEV_API dependencyArnd Bergmann
Without this, I get a build error: drivers/staging/media/imx/imx-media-vdic.c: In function '__vdic_get_fmt': drivers/staging/media/imx/imx-media-vdic.c:554:10: error: implicit declaration of function 'v4l2_subdev_get_try_format'; did you mean 'v4l2_subdev_notify_event'? [-Werror=implicit-function-declaration] Fixes: e130291212df ("[media] media: Add i.MX media core driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-08media: atomisp2: don't set driver_versionHans Verkuil
This field will be removed as it is not needed anymore. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-08Merge tag 'v4.13-rc4' into patchworkMauro Carvalho Chehab
Linux 4.13-rc4 * tag 'v4.13-rc4': (863 commits) Linux 4.13-rc4 Fix compat_sys_sigpending breakage ext4: fix copy paste error in ext4_swap_extents() ext4: fix overflow caused by missing cast in ext4_resize_fs() ext4, project: expand inode extra size if possible ext4: cleanup ext4_expand_extra_isize_ea() ext4: restructure ext4_expand_extra_isize ext4: fix forgetten xattr lock protection in ext4_expand_extra_isize ext4: make xattr inode reads faster ext4: inplace xattr block update fails to deduplicate blocks ext4: remove unused mode parameter ext4: fix warning about stack corruption ext4: fix dir_nlink behaviour ext4: silence array overflow warning ext4: fix SEEK_HOLE/SEEK_DATA for blocksize < pagesize platform/x86: intel-vbtn: match power button on press rather than release ext4: release discard bio after sending discard commands sparc64: Fix exception handling in UltraSPARC-III memcpy. arm64: avoid overflow in VA_START and PAGE_OFFSET arm64: Fix potential race with hardware DBM in ptep_set_access_flags() ...
2017-07-26media: imx: csi: enable double write reductionPhilipp Zabel
For 4:2:0 subsampled YUV formats, avoid chroma overdraw by only writing chroma for even lines. Reduces necessary write memory bandwidth by 25%. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-26media: atomisp2: array underflow in imx_enum_frame_size()Dan Carpenter
The code looks in imx_enum_frame_size() looks like this: 2066 int index = fse->index; 2067 struct imx_device *dev = to_imx_sensor(sd); 2068 2069 mutex_lock(&dev->input_lock); 2070 if (index >= dev->entries_curr_table) { 2071 mutex_unlock(&dev->input_lock); 2072 return -EINVAL; 2073 } 2074 2075 fse->min_width = dev->curr_res_table[index].width; "fse->index" is a u32 that comes from the user. We want negative values of "index" to be -EINVAL so we don't read before the start of the dev->curr_res_table[] array. I've made "entries_curr_table" unsigned long to fix this. I thought about making it unsigned int, but because of struct alignment, it doesn't use more memory either way. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-26media: atomisp2: array underflow in ap1302_enum_frame_size()Dan Carpenter
The problem is this code from ap1302_enum_frame_size(): 738 int index = fse->index; 739 740 mutex_lock(&dev->input_lock); 741 context = ap1302_get_context(sd); 742 if (index >= dev->cntx_res[context].res_num) { 743 mutex_unlock(&dev->input_lock); 744 return -EINVAL; 745 } 746 747 res_table = dev->cntx_res[context].res_table; 748 fse->min_width = res_table[index].width; "fse->index" is a u32 that come from the user. We want negative values of "index" to be treated as -EINVAL but they're not so we can read from before the start of the res_table[] array. I've fixed this by making "res_num" a u32. I made "cur_res" a u32 as well, just for consistency. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-26media: atomisp2: Array underflow in atomisp_enum_input()Dan Carpenter
The problem here is this code from atomisp_enum_input(): 581 int index = input->index; 582 583 if (index >= isp->input_cnt) 584 return -EINVAL; 585 586 if (!isp->inputs[index].camera) 587 return -EINVAL; "input->index" is a u32 which comes from the ioctl. We want negative values of "index" to be counted as -EINVAL but they aren't. I've fixed this by changing the type of "isp->input_cnt" to unsigned int. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-26media: staging: atomisp: array underflow in ioctlDan Carpenter
I noticed an array underflow in ov5693_enum_frame_size(). The code looks like this: int index = fse->index; if (index >= N_RES) retur -EINVAL; fse->index is a u32 that comes from the user. We want negative values to be counted as -EINVAL but they aren't. There are several ways to fix this but I feel like the best fix for future proofing is to change the type of N_RES from int to unsigned long to make it the same as if we were comparing against ARRAY_SIZE(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-20media: atomisp: use LINUX_VERSION_CODE for driver versionMauro Carvalho Chehab
The atomisp subdev driver hardcodes its version to ATOMISP_CSS_VERSION_21. Yet, it has several tests for versions below 21 internally, with sounds really odd. On all other media drivers, we're just keeping version set to LINUX_VERSION_CODE. So, do the same here, simplifying the code a little bit. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-20media: radio-bcm2048: get rid of BCM2048_DRIVER_VERSIONMauro Carvalho Chehab
This macro is never used. Get rid of it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: fixed trivial coding style issueShy More
Below was the trival error flagged by checkpatch.pl: ERROR: space prohibited after that open parenthesis '(' Signed-off-by: Shy More <smklearn@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: fixed trivial coding style warningShy More
Below was the trivial wanrning flagged by checkpatch.pl WARNING: Block comments use * on subsequent lines Signed-off-by: Shy More <smklearn@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: hmm: Alignment code (rebased)Philipp Guendisch
This patch fixed code alignment to open paranthesis. Semantic should not be affected by this patch. It has been rebased on top of media_tree atomisp branch Signed-off-by: Philipp Guendisch <philipp.guendisch@fau.de> Signed-off-by: Chris Baller <chris.baller@gmx.de> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: hmm: Fixed comment stylePhilipp Guendisch
This patch fixed comment style. Semantic should not be affected. There are also two warnings left about too long lines, which reduce readability if changed. Signed-off-by: Philipp Guendisch <philipp.guendisch@fau.de> Signed-off-by: Chris Baller <chris.baller@gmx.de> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: Use kvfree() instead of kfree()/vfree()Amitoj Kaur Chawla
Conditionally calling kfree()/vfree() can be replaced by a call to kvfree() which handles both kmalloced memory and vmalloced memory. The resulting wrapper function has been replaced with direct calls to kvfree(). This change was made with the help of the following Coccinelle semantic patch: //<smpl> @@ expression a; @@ - if(...) { vfree(a); } - else { kfree(a); } + kvfree(a); // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: use kstrdup to replace kmalloc and memcpyHari Prasath
kstrdup kernel primitive can be used to replace kmalloc followed by string copy. This was reported by coccinelle tool. Signed-off-by: Hari Prasath <gehariprasath@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: gc2235: constify acpi_device_idArvind Yadav
acpi_device_id are not supposed to change at runtime. All functions working with acpi_device_id provided by <acpi/acpi_bus.h> work with const acpi_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 10754 1360 4 12118 2f56 drivers/staging/media/atomisp/i2c/gc2235.o File size After adding 'const': text data bss dec hex filename 10818 1296 4 12118 2f56 drivers/staging/media/atomisp/i2c/gc2235.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: mt9m114: constify acpi_device_idArvind Yadav
acpi_device_id are not supposed to change at runtime. All functions working with acpi_device_id provided by <acpi/acpi_bus.h> work with const acpi_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 15148 2640 8 17796 4584 drivers/staging/media/atomisp/i2c/mt9m114.o File size After adding 'const': text data bss dec hex filename 15244 2512 8 17764 4564 drivers/staging/media/atomisp/i2c/mt9m114.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: ov5693: constify acpi_device_idArvind Yadav
acpi_device_id are not supposed to change at runtime. All functions working with acpi_device_id provided by <acpi/acpi_bus.h> work with const acpi_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 20729 3264 0 23993 5db9 drivers/staging/media/atomisp/i2c/ov5693/ov5693.o File size After adding 'const': text data bss dec hex filename 20793 3200 0 23993 5db9 drivers/staging/media/atomisp/i2c/ov5693/ov5693.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: ov2722: constify acpi_device_idArvind Yadav
acpi_device_id are not supposed to change at runtime. All functions working with acpi_device_id provided by <acpi/acpi_bus.h> work with const acpi_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 14771 1880 0 16651 410b drivers/staging/media/atomisp/i2c/ov2722.o File size After adding 'const': text data bss dec hex filename 14835 1816 0 16651 410b drivers/staging/media/atomisp/i2c/ov2722.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: gc0310: constify acpi_device_idArvind Yadav
acpi_device_id are not supposed to change at runtime. All functions working with acpi_device_id provided by <acpi/acpi_bus.h> work with const acpi_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 10297 1888 0 12185 2f99 drivers/staging/media/atomisp/i2c/gc0310.o File size After adding 'const': text data bss dec hex filename 10361 1824 0 12185 2f99 drivers/staging/media/atomisp/i2c/gc0310.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: ov8858: constify acpi_device_idArvind Yadav
acpi_device_id are not supposed to change at runtime. All functions working with acpi_device_id provided by <acpi/acpi_bus.h> work with const acpi_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 23804 8448 0 32252 7dfc drivers/staging/media/atomisp/i2c/ov8858.o File size After adding 'const': text data bss dec hex filename 23868 8384 0 32252 7dfc drivers/staging/media/atomisp/i2c/ov8858.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: ov2680: constify acpi_device_idArvind Yadav
acpi_device_id are not supposed to change at runtime. All functions working with acpi_device_id provided by <acpi/acpi_bus.h> work with const acpi_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 12466 3120 8 15594 3cea drivers/staging/media/atomisp/i2c/ov2680.o File size After adding 'const': text data bss dec hex filename 12530 3056 8 15594 3cea drivers/staging/media/atomisp/i2c/ov2680.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: lm3554: constify acpi_device_idArvind Yadav
acpi_device_id are not supposed to change at runtime. All functions working with acpi_device_id provided by <acpi/acpi_bus.h> work with const acpi_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 5347 1920 24 7291 1c7b drivers/staging/media/atomisp/i2c/lm3554.o File size After adding 'const': text data bss dec hex filename 5411 1856 24 7291 1c7b drivers/staging/media/atomisp/i2c/lm3554.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: i2c: ov5693: Fix style a coding style issueIvan Menshykov
Fix checkpath errors Signed-off-by: Ivan Menshykov <ivan.menshykov@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: gc2235: fix sparse warning: missing staticGuillermo O. Freschi
Several local use structs were missing declarations. Added static qualifier to clean up Sparse warning. Signed-off-by: Guillermo O. Freschi <kedrot@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19media: staging: atomisp: Remove unnecessary return statement in void functionAmitoj Kaur Chawla
Return statement at the end of a void function is useless. The Coccinelle semantic patch used to make this change is as follows: //<smpl> @@ identifier f; expression e; @@ void f(...) { <... - return e; ...> } //</smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-17media: staging: atomisp: disable warnings with cc-disable-warningMauro Carvalho Chehab
Instead of directly using -Wno-foo, use cc-disable-warning, as it checks if the compiler has the warnings we want to disable. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-26media: staging: cxd2099: Activate cxd2099 buffer modeJasmin Jessich
Activate the cxd2099 buffer mode. Signed-off-by: Jasmin Jessich <jasmin@anw.at> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>