summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/utils.c')
-rw-r--r--drivers/acpi/utils.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 7def63ab00c0..e3974a8f8fd4 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -725,17 +725,15 @@ bool acpi_dev_found(const char *hid)
725EXPORT_SYMBOL(acpi_dev_found); 725EXPORT_SYMBOL(acpi_dev_found);
726 726
727struct acpi_dev_match_info { 727struct acpi_dev_match_info {
728 const char *dev_name;
729 struct acpi_device *adev;
730 struct acpi_device_id hid[2]; 728 struct acpi_device_id hid[2];
731 const char *uid; 729 const char *uid;
732 s64 hrv; 730 s64 hrv;
733}; 731};
734 732
735static int acpi_dev_match_cb(struct device *dev, void *data) 733static int acpi_dev_match_cb(struct device *dev, const void *data)
736{ 734{
737 struct acpi_device *adev = to_acpi_device(dev); 735 struct acpi_device *adev = to_acpi_device(dev);
738 struct acpi_dev_match_info *match = data; 736 const struct acpi_dev_match_info *match = data;
739 unsigned long long hrv; 737 unsigned long long hrv;
740 acpi_status status; 738 acpi_status status;
741 739
@@ -746,9 +744,6 @@ static int acpi_dev_match_cb(struct device *dev, void *data)
746 strcmp(adev->pnp.unique_id, match->uid))) 744 strcmp(adev->pnp.unique_id, match->uid)))
747 return 0; 745 return 0;
748 746
749 match->dev_name = acpi_dev_name(adev);
750 match->adev = adev;
751
752 if (match->hrv == -1) 747 if (match->hrv == -1)
753 return 1; 748 return 1;
754 749
@@ -818,7 +813,7 @@ acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv)
818 match.hrv = hrv; 813 match.hrv = hrv;
819 814
820 dev = bus_find_device(&acpi_bus_type, NULL, &match, acpi_dev_match_cb); 815 dev = bus_find_device(&acpi_bus_type, NULL, &match, acpi_dev_match_cb);
821 return dev ? match.adev : NULL; 816 return dev ? to_acpi_device(dev) : NULL;
822} 817}
823EXPORT_SYMBOL(acpi_dev_get_first_match_dev); 818EXPORT_SYMBOL(acpi_dev_get_first_match_dev);
824 819