Merge tag 'uuid-for-4.13' of git://git.infradead.org/users/hch/uuid
Pull uuid subsystem from Christoph Hellwig: "This is the new uuid subsystem, in which Amir, Andy and I have started consolidating our uuid/guid helpers and improving the types used for them. Note that various other subsystems have pulled in this tree, so I'd like it to go in early. UUID/GUID summary: - introduce the new uuid_t/guid_t types that are going to replace the somewhat confusing uuid_be/uuid_le types and make the terminology fit the various specs, as well as the userspace libuuid library. (me, based on a previous version from Amir) - consolidated generic uuid/guid helper functions lifted from XFS and libnvdimm (Amir and me) - conversions to the new types and helpers (Amir, Andy and me)" * tag 'uuid-for-4.13' of git://git.infradead.org/users/hch/uuid: (34 commits) ACPI: hns_dsaf_acpi_dsm_guid can be static mmc: sdhci-pci: make guid intel_dsm_guid static uuid: Take const on input of uuid_is_null() and guid_is_null() thermal: int340x_thermal: fix compile after the UUID API switch thermal: int340x_thermal: Switch to use new generic UUID API acpi: always include uuid.h ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() ACPI / extlog: Switch to use new generic UUID API ACPI / bus: Switch to use new generic UUID API ACPI / APEI: Switch to use new generic UUID API acpi, nfit: Switch to use new generic UUID API MAINTAINERS: add uuid entry tmpfs: generate random sb->s_uuid scsi_debug: switch to uuid_t nvme: switch to uuid_t sysctl: switch to use uuid_t partitions/ldm: switch to use uuid_t overlayfs: use uuid_t instead of uuid_be fs: switch ->s_uuid to uuid_t ima/policy: switch to use uuid_t ...
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
#define PCI_DEVICE_ID_INTEL_CNPLP 0x9dee
|
||||
#define PCI_DEVICE_ID_INTEL_CNPH 0xa36e
|
||||
|
||||
#define PCI_INTEL_BXT_DSM_UUID "732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511"
|
||||
#define PCI_INTEL_BXT_DSM_GUID "732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511"
|
||||
#define PCI_INTEL_BXT_FUNC_PMU_PWR 4
|
||||
#define PCI_INTEL_BXT_STATE_D0 0
|
||||
#define PCI_INTEL_BXT_STATE_D3 3
|
||||
@@ -51,14 +51,14 @@
|
||||
* struct dwc3_pci - Driver private structure
|
||||
* @dwc3: child dwc3 platform_device
|
||||
* @pci: our link to PCI bus
|
||||
* @uuid: _DSM UUID
|
||||
* @guid: _DSM GUID
|
||||
* @has_dsm_for_pm: true for devices which need to run _DSM on runtime PM
|
||||
*/
|
||||
struct dwc3_pci {
|
||||
struct platform_device *dwc3;
|
||||
struct pci_dev *pci;
|
||||
|
||||
u8 uuid[16];
|
||||
guid_t guid;
|
||||
|
||||
unsigned int has_dsm_for_pm:1;
|
||||
};
|
||||
@@ -120,7 +120,7 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc)
|
||||
|
||||
if (pdev->device == PCI_DEVICE_ID_INTEL_BXT ||
|
||||
pdev->device == PCI_DEVICE_ID_INTEL_BXT_M) {
|
||||
acpi_str_to_uuid(PCI_INTEL_BXT_DSM_UUID, dwc->uuid);
|
||||
guid_parse(PCI_INTEL_BXT_DSM_GUID, &dwc->guid);
|
||||
dwc->has_dsm_for_pm = true;
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ static int dwc3_pci_dsm(struct dwc3_pci *dwc, int param)
|
||||
tmp.type = ACPI_TYPE_INTEGER;
|
||||
tmp.integer.value = param;
|
||||
|
||||
obj = acpi_evaluate_dsm(ACPI_HANDLE(&dwc->pci->dev), dwc->uuid,
|
||||
obj = acpi_evaluate_dsm(ACPI_HANDLE(&dwc->pci->dev), &dwc->guid,
|
||||
1, PCI_INTEL_BXT_FUNC_PMU_PWR, &argv4);
|
||||
if (!obj) {
|
||||
dev_err(&dwc->pci->dev, "failed to evaluate _DSM\n");
|
||||
|
@@ -216,13 +216,12 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
#ifdef CONFIG_ACPI
|
||||
static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev)
|
||||
{
|
||||
static const u8 intel_dsm_uuid[] = {
|
||||
0xb7, 0x0c, 0x34, 0xac, 0x01, 0xe9, 0xbf, 0x45,
|
||||
0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23,
|
||||
};
|
||||
static const guid_t intel_dsm_guid =
|
||||
GUID_INIT(0xac340cb7, 0xe901, 0x45bf,
|
||||
0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23);
|
||||
union acpi_object *obj;
|
||||
|
||||
obj = acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), intel_dsm_uuid, 3, 1,
|
||||
obj = acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), &intel_dsm_guid, 3, 1,
|
||||
NULL);
|
||||
ACPI_FREE(obj);
|
||||
}
|
||||
|
@@ -55,13 +55,13 @@ struct ucsi {
|
||||
|
||||
static int ucsi_acpi_cmd(struct ucsi *ucsi, struct ucsi_control *ctrl)
|
||||
{
|
||||
uuid_le uuid = UUID_LE(0x6f8398c2, 0x7ca4, 0x11e4,
|
||||
0xad, 0x36, 0x63, 0x10, 0x42, 0xb5, 0x00, 0x8f);
|
||||
guid_t guid = GUID_INIT(0x6f8398c2, 0x7ca4, 0x11e4,
|
||||
0xad, 0x36, 0x63, 0x10, 0x42, 0xb5, 0x00, 0x8f);
|
||||
union acpi_object *obj;
|
||||
|
||||
ucsi->data->ctrl.raw_cmd = ctrl->raw_cmd;
|
||||
|
||||
obj = acpi_evaluate_dsm(ACPI_HANDLE(ucsi->dev), uuid.b, 1, 1, NULL);
|
||||
obj = acpi_evaluate_dsm(ACPI_HANDLE(ucsi->dev), &guid, 1, 1, NULL);
|
||||
if (!obj) {
|
||||
dev_err(ucsi->dev, "%s: failed to evaluate _DSM\n", __func__);
|
||||
return -EIO;
|
||||
|
@@ -105,8 +105,8 @@ enum wcove_typec_role {
|
||||
WCOVE_ROLE_DEVICE,
|
||||
};
|
||||
|
||||
static uuid_le uuid = UUID_LE(0x482383f0, 0x2876, 0x4e49,
|
||||
0x86, 0x85, 0xdb, 0x66, 0x21, 0x1a, 0xf0, 0x37);
|
||||
static guid_t guid = GUID_INIT(0x482383f0, 0x2876, 0x4e49,
|
||||
0x86, 0x85, 0xdb, 0x66, 0x21, 0x1a, 0xf0, 0x37);
|
||||
|
||||
static int wcove_typec_func(struct wcove_typec *wcove,
|
||||
enum wcove_typec_func func, int param)
|
||||
@@ -118,7 +118,7 @@ static int wcove_typec_func(struct wcove_typec *wcove,
|
||||
tmp.type = ACPI_TYPE_INTEGER;
|
||||
tmp.integer.value = param;
|
||||
|
||||
obj = acpi_evaluate_dsm(ACPI_HANDLE(wcove->dev), uuid.b, 1, func,
|
||||
obj = acpi_evaluate_dsm(ACPI_HANDLE(wcove->dev), &guid, 1, func,
|
||||
&argv4);
|
||||
if (!obj) {
|
||||
dev_err(wcove->dev, "%s: failed to evaluate _DSM\n", __func__);
|
||||
@@ -314,7 +314,7 @@ static int wcove_typec_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!acpi_check_dsm(ACPI_HANDLE(&pdev->dev), uuid.b, 0, 0x1f)) {
|
||||
if (!acpi_check_dsm(ACPI_HANDLE(&pdev->dev), &guid, 0, 0x1f)) {
|
||||
dev_err(&pdev->dev, "Missing _DSM functions\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
Reference in New Issue
Block a user