summaryrefslogtreecommitdiff
path: root/include/linux/acpi.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-07-07 23:48:25 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-07-07 23:48:25 +0300
commit8076ca480f40c51ab87d8301c830a817b900b4d1 (patch)
tree63fec44892b0566f47102348f1c208fcabee513f /include/linux/acpi.h
parentd0aee67fa19260d772b07f144cf6c93e63431f67 (diff)
parent2051e9248688e4c36e4de2e93b88fa0d74e86261 (diff)
downloadlinux-8076ca480f40c51ab87d8301c830a817b900b4d1.tar.xz
Merge branch 'acpi-scan'
* acpi-scan: ata: ahci_platform: Add ACPI _CLS matching ACPI / scan: Add support for ACPI _CLS device matching
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r--include/linux/acpi.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index fedfd1bea3bf..d2445fa9999f 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -58,6 +58,19 @@ static inline acpi_handle acpi_device_handle(struct acpi_device *adev)
acpi_fwnode_handle(adev) : NULL)
#define ACPI_HANDLE(dev) acpi_device_handle(ACPI_COMPANION(dev))
+/**
+ * ACPI_DEVICE_CLASS - macro used to describe an ACPI device with
+ * the PCI-defined class-code information
+ *
+ * @_cls : the class, subclass, prog-if triple for this device
+ * @_msk : the class mask for this device
+ *
+ * This macro is used to create a struct acpi_device_id that matches a
+ * specific PCI class. The .id and .driver_data fields will be left
+ * initialized with the default value.
+ */
+#define ACPI_DEVICE_CLASS(_cls, _msk) .cls = (_cls), .cls_msk = (_msk),
+
static inline bool has_acpi_companion(struct device *dev)
{
return is_acpi_node(dev->fwnode);
@@ -443,6 +456,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *);
#define ACPI_COMPANION(dev) (NULL)
#define ACPI_COMPANION_SET(dev, adev) do { } while (0)
#define ACPI_HANDLE(dev) (NULL)
+#define ACPI_DEVICE_CLASS(_cls, _msk) .cls = (0), .cls_msk = (0),
struct fwnode_handle;