aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
AgeCommit message (Collapse)AuthorFilesLines
2021-11-15staging: r8188eu: remove efuse type from definition functionsMartin Kaiser3-9/+9
Hal_EFUSEGetEfuseDefinition88E and Hal_EFUSEGetEfuseDefinition_Pseudo88E do not use their efuseType parameter. Remove the parameter from these functions and from their callers. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: mt7621-dts: remove 'gdma' and 'hsdma' nodesSergio Paracuellos1-38/+0
Drivers related with 'gdma' and 'hsdma' nodes are not in-tree. Remove them from the device tree file. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20211113192045.32153-4-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: mt7621-dma: remove driver from treeSergio Paracuellos6-777/+0
This driver was a added a time ago and there is no special effort or work to clean it and any progress at all to mainline it. Also, there is already a driver from Mediatek in 'drivers/dma/mediatek/mtk-hsdma.c' which looks pretty similar to this. So the way of supporting HSDMA for mt7621 would be to modify that driver instead. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20211113192045.32153-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: ralink-gdma: remove driver from treeSergio Paracuellos5-932/+0
This driver was a added a time ago and there is no special effort or work to clean it and any progress at all to mainline it. Also, the main user of this dma controller seems to be 'i2s' in mt7621 SoCs. There is no in-tree driver at all for the 'i2s' and its related device tree node has also been deleted from main device tree file. Hence, remove this driver also for completeness. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20211113192045.32153-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: Remove Netlogic XLP network driverRob Herring9-2424/+0
The Netlogic XLP platform was removed in commit 95b8a5e0111a ("MIPS: Remove NETLOGIC support"), so this driver is now dead. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Ganesan Ramalingam <ganesanr@broadcom.com> Cc: Jayachandran Chandrashekaran Nair <jchandra@broadcom.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211109161401.2204280-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: fix a memory leak in rtw_wx_read32()Dan Carpenter1-1/+7
Free "ptmp" before returning -EINVAL. Fixes: 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver") Cc: stable <stable@vger.kernel.org> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20211109114935.GC16587@kili Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: use GFP_ATOMIC under spinlockMichael Straube1-1/+1
In function rtw_report_sec_ie() kzalloc() is called under a spinlock, so the allocation have to be atomic. Call tree: -> rtw_select_and_join_from_scanned_queue() <- takes a spinlock -> rtw_joinbss_cmd() -> rtw_restruct_sec_ie() -> rtw_report_sec_ie() Fixes: 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver") Cc: stable <stable@vger.kernel.org> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20211108105537.31655-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: Use kzalloc() with GFP_ATOMIC in atomic contextFabio M. De Francesco1-2/+2
Use the GFP_ATOMIC flag of kzalloc() with two memory allocation in report_del_sta_event(). This function is called while holding spinlocks, therefore it is not allowed to sleep. With the GFP_ATOMIC type flag, the allocation is high priority and must not sleep. This issue is detected by Smatch which emits the following warning: "drivers/staging/r8188eu/core/rtw_mlme_ext.c:6848 report_del_sta_event() warn: sleeping in atomic context". After the change, the post-commit hook output the following message: "CHECK: Prefer kzalloc(sizeof(*pcmd_obj)...) over kzalloc(sizeof(struct cmd_obj)...)". According to the above "CHECK", use the preferred style in the first kzalloc(). Fixes: 79f712ea994d ("staging: r8188eu: Remove wrappers for kalloc() and kzalloc()") Fixes: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver") Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20211101191847.6749-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: stable <stable@vger.kernel.org>
2021-11-15staging/fbtft: Fix backlightNoralf Trønnes2-12/+1
Commit b4a1ed0cd18b ("fbdev: make FB_BACKLIGHT a tristate") forgot to update fbtft breaking its backlight support when FB_BACKLIGHT is a module. Since FB_TFT selects FB_BACKLIGHT there's no need for this conditional so just remove it and we're good. Fixes: b4a1ed0cd18b ("fbdev: make FB_BACKLIGHT a tristate") Cc: <stable@vger.kernel.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://lore.kernel.org/r/20211105204358.2991-1-noralf@tronnes.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: Fix breakage introduced when 5G code was removedLarry Finger1-0/+2
In commit 221abd4d478a ("staging: r8188eu: Remove no more necessary definitions and code"), two entries were removed from RTW_ChannelPlanMap[], but not replaced with zeros. The position within this table is important, thus the patch broke systems operating in regulatory domains osted later than entry 0x13 in the table. Unfortunately, the FCC entry comes before that point and most testers did not see this problem. Fixes: 221abd4d478a ("staging: r8188eu: Remove no more necessary definitions and code") Cc: Stable <stable@vger.kernel.org> # v5.5+ Reported-and-tested-by: Zameer Manji <zmanji@gmail.com> Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Link: https://lore.kernel.org/r/20211107173543.7486-1-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: wlan-ng: Removed unused commentsGabriel Goller1-8/+0
Removed commented-out code pieces that are unnecessary. Signed-off-by: Gabriel Goller <gabrielgoller123@gmail.com> Link: https://lore.kernel.org/r/YY7QKNB7egKuTC36@desktop Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: vt6655: fix camelcase in bRadioOffTommaso Merciai3-4/+4
Replace camel case variable bRadioOff with snake case variable radio_off. Drop Hungarian notation prefix in `bRadioOff` variable. Change it to use snake case. Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com> Link: https://lore.kernel.org/r/20211113102126.82904-1-tomm.merciai@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: simplify two boolean assignmentsMartin Kaiser1-2/+2
There's no need to use the ? operator and to set true and false explicitly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211111212644.9011-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: merge three small functionsMartin Kaiser1-18/+4
ReadAdapterInfo8188EU calls _ReadAdapterInfo8188EU. _ReadAdapterInfo8188EU calls _ReadPROMContent. Each of these functions is small and has only one caller. Move all their code into ReadAdapterInfo8188EU. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211111212644.9011-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: rf_chip is constantMartin Kaiser4-44/+1
For this driver, rf_chip is always RF_6052. Remove the rf_chip component from struct hal_data_8188e and resulting dead code. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211111212644.9011-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove autoload checkMartin Kaiser1-12/+2
In Hal_InitPGData88E, the same code is run, regardless of bautoload_fail_flag. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211111212644.9011-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove haldata's EEPROMSubCustomerIDMartin Kaiser4-29/+0
It is used only in a (disabled) debug print. We can now remove two functions that parsed eeprom info and populated haldata components. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211111212644.9011-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove haldata's EEPROMCustomerIDMartin Kaiser4-12/+2
It is used only in a (disabled) debug print. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211111212644.9011-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove haldata's EEPROMVID / PIDMartin Kaiser3-12/+0
They are used only in a (disabled) debug print. In practice, lsusb can be used to read the actual vid and pid. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211111212644.9011-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: rtl8192u: remove the if condition without effectSaurav Girepunje1-8/+1
In function rtl8192_adapter_start priv->pFirmware->firmware_status is assign to FW_STATUS_0_INIT just after assignment variable is again get check for same value. Therefore if condition will be always be true. So remove the if condition ,else if section and else section which will never get execute. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YYijapuGOmObwM3S@Sauravs-MacBook-Air.local Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: rtl8723bs: core: avoid unnecessary if conditionSaurav Girepunje1-2/+1
In function rtw_lps_change_dtim_hdl remove the if condition check to compare the pwrpriv->dtim to dtim . If both are not equal dtim is getting assign to pwrpriv->dtim. But if both are equal assigning dtim to pwrpriv->dtim will not make any difference on value. So remove the unnecessary if condition check. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YYgWHt+PpyqOv40R@Sauravs-MacBook-Air.local Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: os_dep: Change the return type of functionSaurav Girepunje1-6/+3
Change the return type of rtw_init_default_value function from u8 to void. This function always return success. This is called from rtw_init_drv_sw where the return value from this function is assign to local variable but the local variable value is never checked. After change the return type to void remove the local variable ret8 in rtw_init_drv_sw function. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YYgCHkVXFQ4r9dVp@Sauravs-MacBook-Air.local Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove efuse write functionsMartin Kaiser2-464/+0
The r8188eu driver in its current state does not need write access to the efuses. Only read access is required to get the chip id, the mac address and other settings. This patch removes a lot of unused code for writing the efuses. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211107161624.9452-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove write support from rtl8188e_EfusePowerSwitchMartin Kaiser3-19/+4
The rtl8188e_EfusePowerSwitch function has a write parameter that is set to false by its callers. Remove the parameter and resulting dead code. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211107161624.9452-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: clean up _PHY_PathADDAOnMartin Kaiser2-18/+5
The only caller sets isPathAOn = true and is2t = false. Remove the parameters and resulting dead code. Make the function static, it's used only inside HalPhyRf_8188e.c. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211107143100.9047-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove constant phy_IQCalibrate_8188E parameterMartin Kaiser2-86/+4
The only caller of phy_IQCalibrate_8188E sets the is2t parameter to false. Remove the parameter and resulting dead code. This includes the phy_PathB_IQK_8188E and _PHY_PathAStandBy functions. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211107143100.9047-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove unused phy_PathA_RxIQK parameterMartin Kaiser1-2/+2
phy_PathA_RxIQK does not use its configPathB parameter. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211107143100.9047-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove unused phy_PathA_IQK_8188E parameterMartin Kaiser1-2/+2
The phy_PathA_IQK_8188E function does not use its configPathB parameter. It can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211107143100.9047-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: pi433: print rf69 debug message more detailSidong Yang1-19/+19
When pi433 failed for rf69 configuration, Debug message should help for finding which value is incorrect. But it's hard to know because it just prints "illegal value". This patch make print message more detail. Signed-off-by: Sidong Yang <realwakka@gmail.com> Link: https://lore.kernel.org/r/20211107105947.21928-1-realwakka@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove MSG_88E macroPhillip Potter1-6/+0
Remove MSG_88E macro from include/rtw_debug.h, as it no longer has any callers within the driver. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20211106231636.894-3-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: convert final two MSG_88E calls to netdev_dbgPhillip Potter1-2/+3
Convert final two MSG_88E calls to use netdev_dbg instead. They seem to contain useful information so rather than delete them outright, it makes sense to convert them over to use the kernel's dynamic debugging/logging facility as other network drivers do. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20211106231636.894-2-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: vt6655: fix camelcase byData in card.cTommaso Merciai1-16/+16
Replace camelcase variable "byData" into linux kernel coding style equivalent variable "data" in card.c. "by" prefix in hungarian notation stands for byte or unsigned char References: https://www.kernel.org/doc/html/latest/process/coding-style.html https://www.cse.iitk.ac.in/users/dsrkg/cs245/html/Guide.htm Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com> Link: https://lore.kernel.org/r/20211106184822.24242-1-tomm.merciai@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: rtl8723bs: core: remove unused local variable padapterSaurav Girepunje1-5/+2
Remove the unused variable padapter from Efuse_Write1ByteToFakeContent This variable is not used in the function. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/20211105165330.78524-3-saurav.girepunje@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: rtl8723bs: core: remove unused variable pAdapterSaurav Girepunje1-5/+2
Remove the unused variable pAdapter from Efuse_Read1ByteFromFakeContent This variable is not used in the function. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/20211105165330.78524-2-saurav.girepunje@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: fbtft: Remove fb_watterott driverNoralf Trønnes3-309/+0
This driver was made for a prototype and as far as I know it never went into production because it was too slow. So let's remove it. Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://lore.kernel.org/r/20211105202448.62518-1-noralf@tronnes.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove MSG_88E call from odm_TXPowerTrackingThermalMeterInitPhillip Potter1-2/+0
Remove unnecessary MSG_88E macro call from hal/odm.c, within the function odm_TXPowerTrackingThermalMeterInit. All it does is print a struct member, during initialization, that is then immediately set on the following line. It is therefore surplus to requirements. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20211105002807.6628-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: core: remove the unused variable pAdapterSaurav Girepunje1-5/+2
Remove the unused variable pAdapter from Efuse_Write1ByteToFakeContent This variable is not used in the function. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YYNSAqGgDPhV1IE1@Sauravs-MacBook-Air.local Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: core: remove unused variable szSaurav Girepunje1-2/+2
Remove the unused variable sz from function dynamic_chk_wk_hdl. This variable is not used on function. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YYNNDXtkICWpk6qj@Sauravs-MacBook-Air.local Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: core: remove the function __nat25_timeoutSaurav Girepunje1-10/+1
Remove the function __nat25_timeout from rtw_br_ext.c file. This function can be replace by single statement jiffies - NAT25_AGEING_TIME*HZ. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YYNJPCQ5hX8BTzwy@Sauravs-MacBook-Air.local Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: os_dep: remove the goto statementSaurav Girepunje1-23/+11
Remove the goto statement from rtw_init_drv_sw(). In this function goto can be replace by return statement. As on goto label exit, function only return it is not performing any cleanup. Avoiding goto will improve the function readability. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YYKvWeyqd71pYSqM@Sauravs-MacBook-Air.local Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove ODM_Write4ByteMartin Kaiser3-11/+1
Remove the ODM_Write4Byte wrapper and call rtw_write32 directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211102081833.18054-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove ODM_Write2ByteMartin Kaiser3-9/+1
Remove the ODM_Write2Byte wrapper and call rtw_write16 directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211102081833.18054-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove ODM_Write1ByteMartin Kaiser5-24/+14
Remove the ODM_Write1Byte wrapper and call rtw_write8 directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211102081833.18054-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove ODM_Read4ByteMartin Kaiser4-15/+6
Remove the ODM_Read4Byte wrapper and call rtw_read32 directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211102081833.18054-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove ODM_Read1ByteMartin Kaiser3-12/+4
This is just a wrapper that calls rtw_read8. Remove the wrapper and call rtw_read8 directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211102081833.18054-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15media: atomisp: Remove unneeded null checkXu Wang1-17/+15
In ia_css_frame_map, the check of 'err' is unneeded to be done twice. Link: https://lore.kernel.org/linux-media/20211110094910.67951-1-vulab@iscas.ac.cn Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-15media: atomisp: get rid of atomisp_get_frame_pgnr() abstractionMauro Carvalho Chehab3-19/+1
Simplify the code by getting rid of this function, as it ends being just a single line of code. Link: https://lore.kernel.org/linux-media/80ea920d14379124ba92aab2e6a6d12a92d79b2b.1636544620.git.mchehab+huawei@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-15media: atomisp: simplify asd check on open() fopsMauro Carvalho Chehab1-1/+1
The open() fops support two types of devices: "acc" and normal ones. the acc works on a different way, using a different pipe struct. Not sure yet if it would make sense to setup a run_mode there. Also, As default_run_mode exists only on normal modes, we can simplify the logic to check if the device is in normal mode. That solves this warning: ../drivers/staging/media/atomisp/pci/atomisp_fops.c:904 atomisp_open() warn: variable dereferenced before check 'asd' (see line 807) Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-15media: atomisp: check before deference asd variableMauro Carvalho Chehab1-2/+4
The asd->isp was referenced before checking if asd is not NULL. This fixes this warning: ../drivers/staging/media/atomisp/pci/atomisp_cmd.c:5548 atomisp_set_fmt_to_snr() warn: variable dereferenced before check 'asd' (see line 5540) While here, avoid getting the pipe pointer twice. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-15media: atomisp: only initialize mode if pipe is not nullMauro Carvalho Chehab1-1/+1
During atomisp register, udev tries to open all devices. For some, pipe is NULL, at least during register time, causing the driver to try to access a NULL pointer. So, add an extra check to avoid such condition. Link: https://lore.kernel.org/linux-media/6406265f2d5f3791d5c7cbd1364186217f19524c.1636364423.git.mchehab+huawei@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>