mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	platform/x86: msi-wmi-platform: Rename "data" variable
Rename the "data" variable inside msi_wmi_platform_read() to avoid a name collision when the driver adds support for a state container struct (that is to be called "data" too) in the future. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20250414140453.7691-1-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
		
							parent
							
								
									202a861205
								
							
						
					
					
						commit
						912d614ac9
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -173,7 +173,7 @@ static int msi_wmi_platform_read(struct device *dev, enum hwmon_sensor_types typ
 | 
				
			||||||
	struct wmi_device *wdev = dev_get_drvdata(dev);
 | 
						struct wmi_device *wdev = dev_get_drvdata(dev);
 | 
				
			||||||
	u8 input[32] = { 0 };
 | 
						u8 input[32] = { 0 };
 | 
				
			||||||
	u8 output[32];
 | 
						u8 output[32];
 | 
				
			||||||
	u16 data;
 | 
						u16 value;
 | 
				
			||||||
	int ret;
 | 
						int ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ret = msi_wmi_platform_query(wdev, MSI_PLATFORM_GET_FAN, input, sizeof(input), output,
 | 
						ret = msi_wmi_platform_query(wdev, MSI_PLATFORM_GET_FAN, input, sizeof(input), output,
 | 
				
			||||||
| 
						 | 
					@ -181,11 +181,11 @@ static int msi_wmi_platform_read(struct device *dev, enum hwmon_sensor_types typ
 | 
				
			||||||
	if (ret < 0)
 | 
						if (ret < 0)
 | 
				
			||||||
		return ret;
 | 
							return ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	data = get_unaligned_be16(&output[channel * 2 + 1]);
 | 
						value = get_unaligned_be16(&output[channel * 2 + 1]);
 | 
				
			||||||
	if (!data)
 | 
						if (!value)
 | 
				
			||||||
		*val = 0;
 | 
							*val = 0;
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		*val = 480000 / data;
 | 
							*val = 480000 / value;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue