aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vc04_services/bcm2835-camera (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-01-15staging: vc04_services: bcm2835-camera: remove redundant license textGreg Kroah-Hartman12-48/+0
Now that the SPDX tag is in all drivers/staging/vc04_services/bcm2835-camera/ files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Eric Anholt <eric@anholt.net> Cc: Stefan Wahren <stefan.wahren@i2se.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Ray Jui <rjui@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Cc: <bcm-kernel-feedback-list@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-15staging: vc04_services: bcm2835-camera: add SPDX identifiersGreg Kroah-Hartman12-0/+12
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Fix up the bcm2835-camera driver to have a proper SPDX identifier, based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Cc: Eric Anholt <eric@anholt.net> Cc: Stefan Wahren <stefan.wahren@i2se.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Ray Jui <rjui@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Cc: <bcm-kernel-feedback-list@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06staging: vc04_services: Use __func__Genki Sky1-2/+2
This was found using checkpatch.pl's EMBEDDED_FUNCTION_NAME warning. It is easier to be consistent and always use __func__ instead of having to remember to update any hardcoded references to the original name. Signed-off-by: Genki Sky <sky@genki.is> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06staging: vc04_services: Unsplit user-visible stringsGenki Sky2-6/+4
This was found using checkpatch.pl's SPLIT_STRING warning. While joining these strings makes for long lines, the kernel codebase consistently does it this way to make user-visible strings easier to grep for. Signed-off-by: Genki Sky <sky@genki.is> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06staging: vc04_services: Join multiline dereferencesGenki Sky1-10/+6
This was found using checkpatch.pl's MULTILINE_DEREFERENCE warning. Putting the dereference onto one line makes them easier to read, especially when part of a larger expression (in this case, function arguments and ternary operator), and when the dereferences are short (as they are here). Signed-off-by: Genki Sky <sky@genki.is> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28staging: bcm2835-camera use ktime_t for timestampsArnd Bergmann2-29/+10
struct timeval is deprecated for in-kernel use, and converting this function to use ktime_t makes it simpler as well. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-13Merge tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds3-14/+14
Pull staging and IIO updates from Greg KH: "Here is the "big" staging and IIO driver update for 4.15-rc1. Lots and lots of little changes, almost all minor code cleanups as the Outreachy application process happened during this development cycle. Also happened was a lot of IIO driver activity, and the typec USB code moving out of staging to drivers/usb (same commits are in the USB tree on a persistent branch to not cause merge issues.) Overall, it's a wash, I think we added a few hundred more lines than removed, but really only a few thousand were modified at all. All of these have been in linux-next for a while. There might be a merge issue with Al's vfs tree in the pi433 driver (take his changes, they are always better), and the media tree with some of the odd atomisp cleanups (take the media tree's version)" * tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (507 commits) staging: lustre: add SPDX identifiers to all lustre files staging: greybus: Remove redundant license text staging: greybus: add SPDX identifiers to all greybus driver files staging: ccree: simplify ioread/iowrite staging: ccree: simplify registers access staging: ccree: simplify error handling logic staging: ccree: remove dead code staging: ccree: handle limiting of DMA masks staging: ccree: copy IV to DMAable memory staging: fbtft: remove redundant initialization of buf staging: sm750fb: Fix parameter mistake in poke32 staging: wilc1000: Fix bssid buffer offset in Txq staging: fbtft: fb_ssd1331: fix mirrored display staging: android: Fix checkpatch.pl error staging: greybus: loopback: convert loopback to use generic async operations staging: greybus: operation: add private data with get/set accessors staging: greybus: loopback: Fix iteration count on async path staging: greybus: loopback: Hold per-connection mutex across operations staging: greybus/loopback: use ktime_get() for time intervals staging: fsl-dpaa2/eth: Extra headroom in RX buffers ...
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman1-0/+1
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-03staging: bcm2835-camera: pr_err() strings should end with newlinesArvind Yadav1-1/+1
pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-29Staging: vc04_services: bcm2835-camera: use BIT macroKeerthi Reddy1-11/+11
Use BIT macro instead of left shift Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-29staging: vc04_services: fix typosKeerthi Reddy1-1/+1
Some words are misspelled. Fix typos. Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17Staging: vc04_services: bcm2835-camera: Fix spelling mistakeMeghana Madhyastha1-1/+1
Fixes a spelling mistake in the comments. Problem found using checkpatch. Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-28staging: bcm2835-camera: make video_device constBhumika Goyal1-1/+1
Make this const as it is only used in a copy operation. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18staging: bcm2835-camera: constify vb2_ops structuresJulia Lawall1-1/+1
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18staging: media/platform/bcm2835: remove gstreamer workaroundKevin Wern2-65/+0
Gstreamer's v4l2src reacted poorly to certain outputs from the bcm2835 video driver's ioctl ops function vidioc_enum_framesizes, so a workaround was created that could be activated by user input. This workaround would replace the driver's ioctl ops struct with another, similar struct--only with no function pointed to by vidioc_enum_framesizes. With no response, gstreamer would attempt to continue with some default settings that happened to work better. However, this bug has been fixed in gstreamer since 2014, so we shouldn't include this workaround in the stable version of the driver. Signed-off-by: Kevin Wern <kevin.m.wern@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging: bcm2835-camera: fix spelling mistake: "elementry" -> "elementary"Colin Ian King3-5/+5
trivial fix to spelling mistake in various comments and pr_debug messages Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21bcm2835-v4l2: Fix buffer overflow problemDave Stevenson1-1/+6
https://github.com/raspberrypi/linux/issues/1447 port_parameter_get() failed to account for the header (u32 id and u32 size) in the size before memcpying the response into the response buffer, so overrunning the provided buffer by 8 bytes. Account for those bytes, and also a belt-and-braces check to ensure we never copy more than *value_size bytes into value. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org> Signed-off-by: Michael Zoran <mzoran@crowfest.net> Tested-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12Staging: bcm2835: Fixed style of block commentsDerek Robson6-32/+45
Fixed style of block comments across whole driver Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12staging: bcm2835-camera: remove anonymous field declarationsAishwarya Pant1-10/+10
Anonymous field declarations are error prone. This patch replaces anonymous declarations with explicit field declarations for typedef SERVICE_CREATION_T in vchiq_mmal_init(..) Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-10staging: bcm2835-camera: use kernel preferred style for handling errorsAishwarya Pant1-6/+6
This patch replaces NULL error values with error pointer values. Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-10staging: bcm2835-camera: replace kmalloc with kzallocAishwarya Pant1-5/+3
This patch replaces kmalloc and memset with kzalloc Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-10staging: bcm2835-camera: add check to avoid null pointer dereferenceAishwarya Pant1-2/+8
This patch adds checks after memory allocation to avoid possible null pointer dereferences. Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-10staging: bcm2835-camera: remove depends on ARMMichael Zoran1-1/+0
Since all the arm64 specific issues have been fixed now and the camera is working fine with a arm64 kernel, the depends on ARM can be removed from Kconfig. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-10staging: bcm2835-camera: Fix bogus compiler warnings regarding constantsMichael Zoran2-3/+4
In debug logging code, the compiler is warning about imposible situations and size of constants not matching the format specifier. This change fixes all three instances of this. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-10staging: bcm2835-camera: Fix buffer overflow calculation on query of camera propertiesMichael Zoran1-1/+1
The code that queries properties on the camera has a check for buffer overruns if the firmware sends too much data. This check is incorrect, and during testing I was seeing stack corruption. I believe this error can actually happen in normal use, just for some reason it doesn't appear on 32 bit as often. So perhaps it's best for the check to be fixed. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-10staging: bcm2835-camera: Convert spinlock to mutex in handle mapping codeMichael Zoran1-12/+11
The handle mapping code that converts context pointers to handles uses a spinlock. Since the btree implementation can sleep while allocating memory, turning on several kernel debugging options will result in errors in the log. Since this code path is never called in atomic context, perhaps it's better to just use a mutex. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-10staging: bcm2835-camera: Convert struct mmal_buffer_header info fields to u32Michael Zoran2-6/+7
The struct mmal_buffer_header has multiple fields used for informational and debugging purposes. These are safe to convert to u32. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-10staging: bcm2835-camera: Convert struct mmal_port info fields to u32Michael Zoran2-6/+6
The struct mmal_port has a few informational fields. Convert these to u32. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-10staging: bcm2835-camera: Convert client_context field to a 32 bit handleMichael Zoran2-3/+11
The client_context field is passed around which is really just a pointer to a msg_context. A lookup table mechanism for msg_context was added previously, so convert this field to a handle as well. The firmware never interperates the client_context, just passed it back. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-10staging: bcm2835-camera: Convert delayed_buffer to u32Michael Zoran1-1/+1
A delayed buffer field is passed between the firmware and the kernel. This field is never used either so it's safe to change it to a u32. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-10staging: bcm2835-camera: Convert client_component field to u32Michael Zoran2-4/+4
In the messages passed back and forth between the camera and the firmware, a client_component field is passed. This is a pointer to a structure that represents part of the camera. Luckly, it's only used for debug logging, so simply convert it to a u32. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-10staging: bcm2835-camera: Create struct mmal_es_format_local to mirror struct mmal_es_formatMichael Zoran3-7/+26
The struct struct mmal_es_format is passed between the firmware which has pointers. A local version of mmal_es_format is also used. Luckly, the two versions are always memberwise copied from each other so simply have different structures for the local and msg versions. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: bcm2835_camera: Use a mapping table for context field of mmal_msg_headerMichael Zoran3-23/+156
The camera driver passes messages back and forth between the firmware with requests and replies. One of the fields of the message header called context is a pointer so the size changes between 32 bit and 64 bit. The context field is used to pair reply messages from the firmware with request messages from the kernel. The simple solution would be to use the padding field for the upper 32 bits of pointers, but this would rely on the firmware always copying the pad field. So instead handles are generated that are 32 bit numbers and a mapping stored in a btree as implemented by the btree library in the kernel lib directory. The mapping pairs the handle with the pointer to the actual data. The btree library was chosen since it's very easy to use and red black trees would be overkill. The camera driver also now forces in the btree library if the camera is included in the build. The btree library is a hidden configuration option. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: bcm2835_camera: Convert control_service field of mmal_msg_header to u32Michael Zoran1-1/+1
The camera driver passes messages back and forth between the firmware with requests and replies. One of the fields of the message header called control_service is a pointer so the size changes between 32 bit and 64 bit. Luckly, the field is not interperated by the driver, so it can be changed to a u32 which has a fixed size. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-08staging: bcm2835-camera: Remove explicit cache flush operationsMichael Zoran1-4/+0
The camera code has an explicit cache flush operation which is not portable. Now that vc04_services is using portable DMA APIs that already do the cache flushing, explicit flushes should no longer be needed. The one call to __cpuc_flush_dcache_area has been removed. Testing: The offical V2 camera for the RPI was tested on a RPI 3 running in 32 bit mode(armhf). The cheese application and ffmpeg was used to view and stream video from the camera. Nothing new seems to be broken without the cache flushing. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-07Staging: media: platform: bcm2835 - style fixDerek Robson1-3/+3
Changed permissions to octal style Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-07staging: bcm2835-camera: Replace ternary operator with min_t macroNarcisa Ana Maria Vasile1-3/+1
Use macro min_t to get the minimum of two values for readability. Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: bcm2835-camera: select BCM2835_VCHIQ rather then depending on it.Michael Zoran1-1/+1
Change the camera's dependency on BCM2835_VCHIQ to a select since camera support is typically more important to people then base VCHIQ(which they may not even know what it's for). Also, with a dependency the camera support would not be visiable until VCHIQ is selected first, and that may not be what most people would expect. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: bcm2835-camera: prefer allocating memory using sizeof(*ptr) instead of sizeof(struct type name)Aishwarya Pant1-1/+1
Using sizeof(*ptr) instead of sizeof(struct type name) is more robust to errors. Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: bcm2835-camera: Replace 'uint32_t' with kernel type u32Narcisa Ana Maria Vasile1-1/+1
This patch fixes the checkpatch.pl issue: CHECK: Prefer kernel type 'u32' over 'uint32_t' Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: bcm2835-camera: Add spaces around '<<'Narcisa Ana Maria Vasile1-2/+2
This patch fixes the checkpatch.pl issue: CHECK: spaces preferred around that '<<' (ctx:VxV) Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: bcm2835-camera: Remove unnecessary blank linesNarcisa Ana Maria Vasile5-15/+0
This patch fixes the checkpatch.pl issue: CHECK: Please don't use multiple blank lines Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: vc04_services: bcm2835-camera: Remove unnecessary variableNarcisa Ana Maria Vasile1-6/+3
Instead of storing the result, make the function return directly Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: bcm2835-camera: Refactored get_format functionNarcisa Ana Maria Vasile1-5/+2
Now, when the condition inside the for is fulfilled, I return the result, instead of checking afterwards whether the counter has reached or not the end of the list. Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: vc04_services: bcm2835-camera: Simplify NULL comparisonsAishwarya Pant4-17/+15
Remove instances of explicit NULL comparisons in bcm2835-camera driver for code compaction. Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: bcm2835-camera: Update driver nameMichael Zoran1-1/+1
Update the name of the camera driver as displayed by the Kconfig to match the audio driver style. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: bcm2835-camera: Move driver under vc04_servicesMichael Zoran15-0/+7171
The bcm2835-camera driver is part of v04_services, so it makes sense for it to be located under vc04_services to make configuration clearer. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>