pci-label.c (8c57a5e7b2820f349c95b8c8393fec1e0f4070d2) | pci-label.c (94116f8126de9762751fd92731581b73b56292e5) |
---|---|
1/* 2 * Purpose: Export the firmware instance and label associated with 3 * a pci device to sysfs 4 * Copyright (C) 2010 Dell Inc. 5 * by Narendra K <Narendra_K@dell.com>, 6 * Jordan Hargrave <Jordan_Hargrave@dell.com> 7 * 8 * PCI Firmware Specification Revision 3.1 section 4.6.7 (DSM for Naming a --- 158 unchanged lines hidden (view full) --- 167 acpi_handle handle; 168 union acpi_object *obj, *tmp; 169 int len = -1; 170 171 handle = ACPI_HANDLE(dev); 172 if (!handle) 173 return -1; 174 | 1/* 2 * Purpose: Export the firmware instance and label associated with 3 * a pci device to sysfs 4 * Copyright (C) 2010 Dell Inc. 5 * by Narendra K <Narendra_K@dell.com>, 6 * Jordan Hargrave <Jordan_Hargrave@dell.com> 7 * 8 * PCI Firmware Specification Revision 3.1 section 4.6.7 (DSM for Naming a --- 158 unchanged lines hidden (view full) --- 167 acpi_handle handle; 168 union acpi_object *obj, *tmp; 169 int len = -1; 170 171 handle = ACPI_HANDLE(dev); 172 if (!handle) 173 return -1; 174 |
175 obj = acpi_evaluate_dsm(handle, pci_acpi_dsm_uuid, 0x2, | 175 obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 0x2, |
176 DEVICE_LABEL_DSM, NULL); 177 if (!obj) 178 return -1; 179 180 tmp = obj->package.elements; 181 if (obj->type == ACPI_TYPE_PACKAGE && obj->package.count == 2 && 182 tmp[0].type == ACPI_TYPE_INTEGER && 183 (tmp[1].type == ACPI_TYPE_STRING || --- 23 unchanged lines hidden (view full) --- 207static bool device_has_dsm(struct device *dev) 208{ 209 acpi_handle handle; 210 211 handle = ACPI_HANDLE(dev); 212 if (!handle) 213 return false; 214 | 176 DEVICE_LABEL_DSM, NULL); 177 if (!obj) 178 return -1; 179 180 tmp = obj->package.elements; 181 if (obj->type == ACPI_TYPE_PACKAGE && obj->package.count == 2 && 182 tmp[0].type == ACPI_TYPE_INTEGER && 183 (tmp[1].type == ACPI_TYPE_STRING || --- 23 unchanged lines hidden (view full) --- 207static bool device_has_dsm(struct device *dev) 208{ 209 acpi_handle handle; 210 211 handle = ACPI_HANDLE(dev); 212 if (!handle) 213 return false; 214 |
215 return !!acpi_check_dsm(handle, pci_acpi_dsm_uuid, 0x2, | 215 return !!acpi_check_dsm(handle, &pci_acpi_dsm_guid, 0x2, |
216 1 << DEVICE_LABEL_DSM); 217} 218 219static umode_t acpi_index_string_exist(struct kobject *kobj, 220 struct attribute *attr, int n) 221{ 222 struct device *dev; 223 --- 83 unchanged lines hidden --- | 216 1 << DEVICE_LABEL_DSM); 217} 218 219static umode_t acpi_index_string_exist(struct kobject *kobj, 220 struct attribute *attr, int n) 221{ 222 struct device *dev; 223 --- 83 unchanged lines hidden --- |