Source
793
793
bool acpi_dev_present(const char *hid, const char *uid, s64 hrv)
794
794
{
795
795
struct acpi_dev_match_info match = {};
796
796
struct device *dev;
797
797
798
798
strlcpy(match.hid[0].id, hid, sizeof(match.hid[0].id));
799
799
match.uid = uid;
800
800
match.hrv = hrv;
801
801
802
802
dev = bus_find_device(&acpi_bus_type, NULL, &match, acpi_dev_match_cb);
803
+
put_device(dev);
803
804
return !!dev;
804
805
}
805
806
EXPORT_SYMBOL(acpi_dev_present);
806
807
807
808
/**
808
809
* acpi_dev_get_first_match_name - Return name of first match of ACPI device
809
810
* @hid: Hardware ID of the device.
810
811
* @uid: Unique ID of the device, pass NULL to not check _UID
811
812
* @hrv: Hardware Revision of the device, pass -1 to not check _HRV
812
813
*