mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	misc: atmel-ssc: prepare clock only when request
Prepare SSC clock only when request SSC channel, the clock will be enabled when initialize the SSC. Signed-off-by: Bo Shen <voice.shen@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
		
							parent
							
								
									d512c2098b
								
							
						
					
					
						commit
						49af54ff0f
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -57,7 +57,7 @@ struct ssc_device *ssc_request(unsigned int ssc_num)
 | 
				
			||||||
	ssc->user++;
 | 
						ssc->user++;
 | 
				
			||||||
	spin_unlock(&user_lock);
 | 
						spin_unlock(&user_lock);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	clk_prepare_enable(ssc->clk);
 | 
						clk_prepare(ssc->clk);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return ssc;
 | 
						return ssc;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -77,7 +77,7 @@ void ssc_free(struct ssc_device *ssc)
 | 
				
			||||||
	spin_unlock(&user_lock);
 | 
						spin_unlock(&user_lock);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (disable_clk)
 | 
						if (disable_clk)
 | 
				
			||||||
		clk_disable_unprepare(ssc->clk);
 | 
							clk_unprepare(ssc->clk);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
EXPORT_SYMBOL(ssc_free);
 | 
					EXPORT_SYMBOL(ssc_free);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue