mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
spi: spi-msm-geni: Store the wrapper dev handle for LE VM also
This change uses correct wrapper dev for LE instead of bypassing. If wrapper dev or internal members are NULL, it crashes during register dump time due to some other error. This change fixes a crash happening to due to NULL pointer access while dumping the register using geni_se_dump_dbg_regs. sample dump from I2C driver which is fixed in i2c: [ 278.999159] Call trace: [ 278.999165] geni_se_dump_dbg_regs+0x98/0x2f0 [ 278.999177] geni_i2c_runtime_resume+0x2f4/0x4c8 [ 278.999186] pm_generic_runtime_resume+0x34/0x48 [ 278.999193] __rpm_callback+0x80/0x1a0 [ 278.999198] rpm_resume+0x4ec/0x720 [ 278.999202] __pm_runtime_resume+0x54/0x78 [ 278.999211] fts_trusted_touch_enable_store+0x1dc/0x8e0 [ 278.999217] dev_attr_store+0x40/0x58 [ 278.999226] sysfs_kf_write+0x50/0x68 [ 278.999231] kernfs_fop_write+0x150/0x1f8 [ 278.999240] __vfs_write+0x54/0x190 [ 278.999247] vfs_write+0xe4/0x1a0 [ 278.999254] __arm64_sys_pwrite64+0x80/0xc0 [ 278.999263] el0_svc_common+0x98/0x118 [ 278.999270] el0_svc_handler+0x7c/0x98 [ 278.999277] el0_svc+0x8/0xc [ 278.999286] Code: f94006a8 d0002800 9134b000 aa1603e1 (f9404d15). Change-Id: Iecdb214452fc8232ee5aa3f803180f4c3a92affd Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
This commit is contained in:
parent
1afca709b6
commit
4f65999959
1 changed files with 1 additions and 1 deletions
|
|
@ -2002,6 +2002,7 @@ static int spi_geni_probe(struct platform_device *pdev)
|
|||
dev_info(&pdev->dev, "LA-VM usecase\n");
|
||||
}
|
||||
|
||||
geni_mas->spi_rsc.wrapper_dev = &wrapper_pdev->dev;
|
||||
/*
|
||||
* For LE, clocks, gpio and icb voting will be provided by
|
||||
* by LA. The SPI operates in GSI mode only for LE usecase,
|
||||
|
|
@ -2009,7 +2010,6 @@ static int spi_geni_probe(struct platform_device *pdev)
|
|||
* in SPI LE dt.
|
||||
*/
|
||||
if (!geni_mas->is_le_vm) {
|
||||
geni_mas->spi_rsc.wrapper_dev = &wrapper_pdev->dev;
|
||||
ret = geni_se_resources_init(rsc, SPI_CORE2X_VOTE,
|
||||
(DEFAULT_SE_CLK * DEFAULT_BUS_WIDTH));
|
||||
if (ret) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue