mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	macintosh/ams: Fix unused variable warning
If both CONFIG_SENSORS_AMS_PMU and CONFIG_SENSORS_AMS_I2C are unset,
there is an unused variable warning in the ams driver:
  drivers/macintosh/ams/ams-core.c: In function 'ams_init':
  drivers/macintosh/ams/ams-core.c:181:29: warning: unused variable 'np'
    181 |         struct device_node *np;
The driver needs at least one of the configs enabled in order to
actually function. So fix the compiler warning by ensuring at least one
of the configs is enabled.
Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240507140150.54630-1-mpe@ellerman.id.au
			
			
This commit is contained in:
		
							parent
							
								
									c330b50d8c
								
							
						
					
					
						commit
						bc8744c6bf
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -262,7 +262,7 @@ config SENSORS_AMS | |||
| 	  will be called ams. | ||||
| 
 | ||||
| config SENSORS_AMS_PMU | ||||
| 	bool "PMU variant" | ||||
| 	bool "PMU variant" if SENSORS_AMS_I2C | ||||
| 	depends on SENSORS_AMS && ADB_PMU | ||||
| 	default y | ||||
| 	help | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Michael Ellerman
						Michael Ellerman