drivers/wifi/generic: Use acpigen_write_ADR_pci_device
This change uses the helper function `acpigen_write_ADR_pci_device()` to write _ADR object for the WiFi device. Change-Id: I3ba38f3ec4d8024209840e93bebf2d39bbef7685 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46858 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
This commit is contained in:
		
				
					committed by
					
						 Patrick Georgi
						Patrick Georgi
					
				
			
			
				
	
			
			
			
						parent
						
							89815c96a6
						
					
				
				
					commit
					2b5be8857b
				
			| @@ -170,7 +170,6 @@ static void emit_sar_acpi_structures(const struct device *dev) | |||||||
| static void wifi_generic_fill_ssdt(const struct device *dev) | static void wifi_generic_fill_ssdt(const struct device *dev) | ||||||
| { | { | ||||||
| 	const char *path; | 	const char *path; | ||||||
| 	u32 address; |  | ||||||
| 	const struct drivers_wifi_generic_config *config = dev->chip_info; | 	const struct drivers_wifi_generic_config *config = dev->chip_info; | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| @@ -189,10 +188,7 @@ static void wifi_generic_fill_ssdt(const struct device *dev) | |||||||
| 		acpigen_write_name_string("_DDN", dev->chip_ops->name); | 		acpigen_write_name_string("_DDN", dev->chip_ops->name); | ||||||
|  |  | ||||||
| 	/* Address */ | 	/* Address */ | ||||||
| 	address = PCI_SLOT(dev->path.pci.devfn) & 0xffff; | 	acpigen_write_ADR_pci_device(dev); | ||||||
| 	address <<= 16; |  | ||||||
| 	address |= PCI_FUNC(dev->path.pci.devfn) & 0xffff; |  | ||||||
| 	acpigen_write_name_dword("_ADR", address); |  | ||||||
|  |  | ||||||
| 	/* Wake capabilities */ | 	/* Wake capabilities */ | ||||||
| 	if (config) | 	if (config) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user