aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-02-26Staging: vt6655: Alignment should match open parenthesisMadhumitha Prabakaran1-1/+1
Fix the check to improve readibility. CHECK: Alignment should match open parenthesis Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: fwserial: Add blank line after declarationsBhanusree Pola1-0/+1
Add blank line after the structure declaration, struct fwtty_port *port = tty->driver_data; Issue found using checkpatch.pl Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: fbtft: Fix line over 80 charactersBhanusree Pola1-3/+3
Fix the checkpatch.pl warning: WARNING:line over 80 characters Move Parameters to the next lines with proper alignment Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: fbtft: Extra blank line not required before '}'Bhanusree Pola1-1/+0
Remove unnecesessary extra blank line before the closing brace, to solve the checkpatch.pl check: CHECK: Extra blank line not required before closing brace '}' Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: fbtft: Alignment should match open parenthesisBhanusree Pola2-2/+2
Clear the warning found by checkpatch.pl WARNING:Alignment should match open parenthesis Adjust paremeters in fbtft_par_dbg and write_reg. Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26staging: netlogic: Remove boilerplate license textBhagyashri Dighole4-117/+2
Removes the boilerplate license text. Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26staging: netlogic: Add SPDX-License-Identifier tag at the topBhagyashri Dighole4-2/+6
Adds the SPDX GPL-2.0 or BSD-2-clause license identifier, which solves the checkpatch.pl warnings: "WARNING: Missing or malformed SPDX-License-Identifier tag in line 1". Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26staging: netlogic: Modify coding style alignmentsBhagyashri Dighole1-8/+12
Fix coding style alignment issues detected by checkpatch.pl Match alignments with parenthesis. Limit lines to 80 characters. Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: mt761-dma: Alignment should match open parenthesisBhanusree Pola1-1/+1
Adjust "dev_dbg" parameters to match alignment with open parenthesis Issue found with checkpatch.pl Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: mt7621_dma: Prefer unsigned int over just unsignedBhanusree Pola1-1/+1
Replace 'unsigned' with 'unsigned int' to be specific with data type. Issue found with checkpatch.pl Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-21net: Get rid of switchdev_port_attr_get()Florian Fainelli1-7/+0
With the bridge no longer calling switchdev_port_attr_get() to obtain the supported bridge port flags from a driver but instead trying to set the bridge port flags directly and relying on driver to reject unsupported configurations, we can effectively get rid of switchdev_port_attr_get() entirely since this was the only place where it was called. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-21net: Remove SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORTFlorian Fainelli1-9/+1
Now that we have converted the bridge code and the drivers to check for bridge port(s) flags at the time we try to set them, there is no need for a get() -> set() sequence anymore and SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT therefore becomes unused. Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-21staging: fsl-dpaa2: ethsw: Handle PORT_PRE_BRIDGE_FLAGSFlorian Fainelli1-0/+14
In preparation for removing SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT, handle the SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS attribute and check that the bridge port flags being configured are supported. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-21staging: octeon-usb: fix misspelled "re-enable"Sumit Pundir1-1/+1
Fixes misspelled "re-enable" in comment. Reported by checkpatch.pl Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-21staging: rtlwifi: Use proper enum for return in halmac_parse_psd_data_88xxNathan Chancellor1-1/+1
Clang warns: drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c:2472:11: warning: implicit conversion from enumeration type 'enum halmac_cmd_process_status' to different enumeration type 'enum halmac_ret_status' [-Wenum-conversion] return HALMAC_CMD_PROCESS_ERROR; ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Fix this by using the proper enum for allocation failures, HALMAC_RET_MALLOC_FAIL, which is used in the rest of this file. Fixes: e4b08e16b7d9 ("staging: r8822be: check kzalloc return or bail") Link: https://github.com/ClangBuiltLinux/linux/issues/375 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-21Staging: rtl8192e: Replace license text with SPDX identifierBhanusree Pola1-8/+1
- adds the SPDX GPL-2.0 license identifier which solves the checkpatch.pl warning - Removed license boilerplate text - Issue found with checkpatch.pl warning: "WARNING: Missing or malformed SPDX-License-Identifier tag in line 1" Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-20staging: erofs: remove rcu_read_lock() in erofs_try_to_free_cached_pageGao Xiang1-11/+5
page_private(page) cannot be changed if page lock is taken. Besides, the corresponding workgroup won't be freed if the page is already protected by page lock, therefore no need to take rcu read lock. Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-20staging: erofs: fix race of initializing xattrs of a inode at the same timeGao Xiang2-15/+37
In real scenario, there could be several threads accessing xattrs of the same xattr-uninitialized inode, and init_inode_xattrs() almost at the same time. That's actually an unexpected behavior, this patch closes the race. Fixes: b17500a0fdba ("staging: erofs: introduce xattr & acl support") Cc: <stable@vger.kernel.org> # 4.19+ Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: visornic: use skb_put_zero() instead of open-coded versionJann Horn1-3/+1
Replace an open-coded version of skb_put_zero() with a call to the helper. This is a cleanup and is also useful for potentially adding KASAN integration to SKBs in the future. Signed-off-by: Jann Horn <jannh@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: erofs: match alignment with open parenthesesBhanusree Pola1-4/+4
Align code with open parantheses to improve the readability. Issue found using checkpatch.pl Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Reviewed-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19media: ipu3-mmu: fix some kernel-doc macrosMauro Carvalho Chehab1-2/+3
Some kernel-doc markups are wrong. fix them. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-02-19media: ipu3: shut up warnings produced with W=1Mauro Carvalho Chehab2-0/+8
There are lots of warnings produced by this driver. It is not as much as atomisp, but it is still a lot. So, use the same solution to hide most of them. Those need to be fixed before promoting it out of staging, so add it at the TODO list. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-02-19media: imx7-media-csi: get rid of unused varMauro Carvalho Chehab1-3/+0
drivers/staging/media/imx/imx7-media-csi.c: In function 'imx7_csi_enum_mbus_code': drivers/staging/media/imx/imx7-media-csi.c:926:33: warning: variable 'in_cc' set but not used [-Wunused-but-set-variable] const struct imx_media_pixfmt *in_cc; ^~~~~ Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-02-19media: imx7-media-csi: don't store a floating pointerMauro Carvalho Chehab1-7/+11
if imx7_csi_try_fmt() fails, outcc variable won't be initialized and csi->cc[IMX7_CSI_PAD_SRC] would be pointing to a random location. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-02-19media: imx7-media-csi.c: fix merge breakageHans Verkuil1-2/+3
Commit 5964cbd86922 ("imx: Set capture compose rectangle in capture_device_set_format") broke the compilation of commit 05f634040c0d ("staging/imx7: add imx7 CSI subdev driver"). These patches came in through different pull requests and nobody noticed that the first changed functions that the second relied upon. Update imx7-media-csi.c accordingly. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Acked-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-02-19staging: android: ashmem: Don't call fallocate() with ashmem_mutex held.Tetsuo Handa1-5/+20
syzbot is hitting lockdep warnings [1][2][3]. This patch tries to fix the warning by eliminating ashmem_shrink_scan() => {shmem|vfs}_fallocate() sequence. [1] https://syzkaller.appspot.com/bug?id=87c399f6fa6955006080b24142e2ce7680295ad4 [2] https://syzkaller.appspot.com/bug?id=7ebea492de7521048355fc84210220e1038a7908 [3] https://syzkaller.appspot.com/bug?id=e02419c12131c24e2a957ea050c2ab6dcbbc3270 Reported-by: syzbot <syzbot+a76129f18c89f3e2ddd4@syzkaller.appspotmail.com> Reported-by: syzbot <syzbot+148c2885d71194f18d28@syzkaller.appspotmail.com> Reported-by: syzbot <syzbot+4b8b031b89e6b96c4b2e@syzkaller.appspotmail.com> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: stable@vger.kernel.org Acked-by: Joel Fernandes (Google) <joel@joelfernandes.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: mt7621-mmc: Prefer using BIT macroBhanusree Pola1-1/+1
Use BIT(x) instead of (1<<x), reported by checkpatch.pl. Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: rtlwifi: Remove set but not used variables 'dataempty, hoffset'YueHaibing1-4/+2
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtlwifi/efuse.c: In function 'efuse_pg_packet_write': drivers/staging/rtlwifi/efuse.c:922:24: warning: variable 'dataempty' set but not used [-Wunused-but-set-variable] drivers/staging/rtlwifi/efuse.c: In function 'efuse_get_current_size': drivers/staging/rtlwifi/efuse.c:1185:5: warning: variable 'hoffset' set but not used [-Wunused-but-set-variable] They're never used and can be removed. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: mt7621-mmc: Remove unused including <linux/version.h>YueHaibing1-1/+0
Remove including <linux/version.h> that don't need it. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: rtl8188eu: fix bad indentation for conditional statementStephen Martin1-1/+1
Fixed else block indentation Signed-off-by: Stephen Martin <lockwood@opperline.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: vt6656: key: Mark expected switch fall-throughsGustavo A. R. Silva1-1/+3
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/staging/vt6656/key.c: In function ‘vnt_set_keymode’: drivers/staging/vt6656/key.c:70:19: warning: this statement may fall through [-Wimplicit-fallthrough=] key->hw_key_idx = entry; ~~~~~~~~~~~~~~~~^~~~~~~ drivers/staging/vt6656/key.c:71:2: note: here case VNT_KEY_ALLGROUP: ^~~~ drivers/staging/vt6656/key.c:73:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (onfly_latch) ^ drivers/staging/vt6656/key.c:75:2: note: here case VNT_KEY_GROUP_ADDRESS: ^~~~ drivers/staging/vt6656/key.c:76:12: warning: this statement may fall through [-Wimplicit-fallthrough=] key_mode |= mode; ~~~~~~~~~^~~~~~~ drivers/staging/vt6656/key.c:77:2: note: here case VNT_KEY_GROUP: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: rtl8192e: Remove set but not used variables 'broad_addr, stype'YueHaibing1-12/+3
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8192e/rtl8192e/rtl_core.c: In function '_rtl92e_tx': drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1732:28: warning: variable 'broad_addr' set but not used [-Wunused-but-set-variable] drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1731:24: warning: variable 'stype' set but not used [-Wunused-but-set-variable] This remove unnessesary bool variable 'multi_addr, broad_addr, uni_addr' Also 'stype' never used and can be removed. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: mt7621-pci: reverse condition to check for enabled portSergio Paracuellos1-1/+1
Each enabled port is being checked in 'mt7621_pcie_enable_ports" function calling 'mt7621_pcie_enable_port'. The return value for this function on success is zero, so the check is reversed. Fix it. Fixes: 802a2f7b2fe3: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: mt7621-pci: remove two register writesSergio Paracuellos1-4/+0
There is no need to write IO and memory space window Host PCI bridge registers before doing anything else. Just use its default values which should be ok. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: mt7621-pci: replace spaces with tabs in commentSergio Paracuellos1-9/+9
To properly follow kernel style replace spaces with tabs in comment where link status bits are explained. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: mt7621-pci: remove not used definitionsSergio Paracuellos1-2/+0
There are two definitions which are not being used at all. Remove them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: mt7621-dts: add general pcie reset line to pcie bindingsSergio Paracuellos1-2/+2
Add general pci reset line to pcie bindings to use reset_control properly in driver code. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: mt7621-pci: add reset control for general pcie resetSergio Paracuellos1-5/+10
There is still a reset line which is not being handled using reset_control properly and just being accessing writing registers. Use reset_control instead for pcie general reset line. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: rtlwifi: fix spelling mistake: "Hightest" -> "Highest"Colin Ian King1-1/+1
Trivial fix to spelling mistake in ODM_RT_TRACE message text, fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: mt7621-pci-phy: use 'module_init' instead of 'arch_initcall'Sergio Paracuellos1-1/+1
Init driver as 'arch_initcall()' does not work. It causes phy_create() to be called before the phy module is initialized, so 'phy_class' is NULL, the new phy isn't placed in the right class, and it cannot be found. Change to 'module_init()' which works properly in this case. Fixes: 00981d31d6df: staging: mt7621-pci-phy: add new driver for phy part of mt7621-pci Reported-by: NeilBrown <neil@brown.name> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: mt7621-dts: fix pci phy register addressesSergio Paracuellos1-4/+4
Both pci-phy0 and pci-phy1 are using bad addresses to search for its registers. Use proper register values. Fixes: 06184ba5a33a: staging: mt7621-dts: add pci-phy related bindings to board's device tree Reported-by: NeilBrown <neil@brown.name> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: r8822be: check kzalloc return or bailNicholas Mc Guire1-1/+4
The kzalloc() in halmac_parse_psd_data_88xx() can fail and return NULL so check the psd_set->data after allocation and if allocation failed return HALMAC_CMD_PROCESS_ERROR. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Fixes: 938a0447f094 ("staging: r8822be: Add code for halmac sub-drive") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: android: ion: fix sys heap pool's gfp_flagsQing Xia1-1/+1
In the first loop, gfp_flags will be modified to high_order_gfp_flags, and there will be no chance to change back to low_order_gfp_flags. Fixes: e7f63771b60e ("ION: Sys_heap: Add cached pool to spead up cached buffer alloc") Signed-off-by: Qing Xia <saberlily.xia@hisilicon.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Jing Xia <jing.xia@unisoc.com> Reviewed-by: Yuming Han <yuming.han@unisoc.com> Reviewed-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com> Reviewed-by: Orson Zhai <orson.zhai@unisoc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-18media: staging/imx: add i.MX7 entries to TODO fileRui Miguel Silva1-0/+9
Add some i.MX7 related entries to TODO file. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-02-18media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7Rui Miguel Silva2-0/+1188
Adds MIPI CSI-2 subdev for i.MX7 to connect with sensors with a MIPI CSI-2 interface. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: clean up some alignment warnings] Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-02-18media: staging/imx7: add imx7 CSI subdev driverRui Miguel Silva3-1/+1377
This add the media entity subdevice and control driver for the i.MX7 CMOS Sensor Interface. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: clean up some alignment warnings] Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-02-18media: staging/imx: rearrange group id to take in account IPURui Miguel Silva7-50/+55
Some imx system do not have IPU, so prepare the imx media drivers to support this kind of devices. Rename the group ids to include an _IPU_ prefix, add a new group id to support systems with only a CSI without IPU, and also rename the create internal links to make it clear that only systems with IPU have internal subdevices. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-02-18media: staging/imx: refactor imx media device probeRui Miguel Silva5-70/+127
Refactor and move media device initialization code to a new common module, so it can be used by other devices, this will allow for example a near to introduce imx7 CSI driver, to use this media device. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-02-18media: cedrus: mpeg2: Use v4l2_m2m_get_vq helper for capture queuePaul Kocialkowski1-5/+5
Since there's a v4l2_m2m_get_vq helper, use it instead of accessing the queue directly, which slightly increases readability. Also reformat the code using the queue a bit while at it. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-02-18media: cedrus: Forbid setting new formats on busy queuesPaul Kocialkowski1-0/+10
Check that our queues are not busy before setting the format or return EBUSY if that's the case. This ensures that our format can't change once buffers are allocated for the queue. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>