ASoC: codecs: wcd937x-sdw: Fix Unbalanced pm_runtime_enable
Fix the unbalanced pm_runtime_enable! in wcd937x-sdw soundwire slave.
Fixes: c99a515ff1 ("ASoC: codecs: wcd937x-sdw: add SoundWire driver")
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Link: https://patch.msgid.link/20240704081723.3394153-2-quic_mohs@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
	
	
This commit is contained in:
		
					parent
					
						
							
								ee3f77a376
							
						
					
				
			
			
				commit
				
					
						0ffc5a40ad
					
				
			
		
					 1 changed files with 8 additions and 10 deletions
				
			
		|  | @ -1067,13 +1067,15 @@ static int wcd9370_probe(struct sdw_slave *pdev, | ||||||
| 		wcd->ch_info = &wcd937x_sdw_rx_ch_info[0]; | 		wcd->ch_info = &wcd937x_sdw_rx_ch_info[0]; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	pm_runtime_set_autosuspend_delay(dev, 3000); |  | ||||||
| 	pm_runtime_use_autosuspend(dev); |  | ||||||
| 	pm_runtime_mark_last_busy(dev); |  | ||||||
| 	pm_runtime_set_active(dev); |  | ||||||
| 	pm_runtime_enable(dev); |  | ||||||
| 
 | 
 | ||||||
| 	return component_add(dev, &wcd937x_sdw_component_ops); | 	ret = component_add(dev, &wcd937x_sdw_component_ops); | ||||||
|  | 	if (ret) | ||||||
|  | 		return ret; | ||||||
|  | 
 | ||||||
|  | 	/* Set suspended until aggregate device is bind */ | ||||||
|  | 	pm_runtime_set_suspended(dev); | ||||||
|  | 
 | ||||||
|  | 	return 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static int wcd9370_remove(struct sdw_slave *pdev) | static int wcd9370_remove(struct sdw_slave *pdev) | ||||||
|  | @ -1082,10 +1084,6 @@ static int wcd9370_remove(struct sdw_slave *pdev) | ||||||
| 
 | 
 | ||||||
| 	component_del(dev, &wcd937x_sdw_component_ops); | 	component_del(dev, &wcd937x_sdw_component_ops); | ||||||
| 
 | 
 | ||||||
| 	pm_runtime_disable(dev); |  | ||||||
| 	pm_runtime_set_suspended(dev); |  | ||||||
| 	pm_runtime_dont_use_autosuspend(dev); |  | ||||||
| 
 |  | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Mohammad Rafi Shaik
				Mohammad Rafi Shaik