forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/pci/hotplug/acpiphp.h
....@@ -8,7 +8,7 @@
88 * Copyright (C) 2002 Hiroshi Aono (h-aono@ap.jp.nec.com)
99 * Copyright (C) 2002,2003 Takayoshi Kochi (t-kochi@bq.jp.nec.com)
1010 * Copyright (C) 2002,2003 NEC Corporation
11
- * Copyright (C) 2003-2005 Matthew Wilcox (matthew.wilcox@hp.com)
11
+ * Copyright (C) 2003-2005 Matthew Wilcox (willy@infradead.org)
1212 * Copyright (C) 2003-2005 Hewlett Packard
1313 *
1414 * All rights reserved.
....@@ -33,15 +33,19 @@
3333 * struct slot - slot information for each *physical* slot
3434 */
3535 struct slot {
36
- struct hotplug_slot *hotplug_slot;
36
+ struct hotplug_slot hotplug_slot;
3737 struct acpiphp_slot *acpi_slot;
38
- struct hotplug_slot_info info;
3938 unsigned int sun; /* ACPI _SUN (Slot User Number) value */
4039 };
4140
4241 static inline const char *slot_name(struct slot *slot)
4342 {
44
- return hotplug_slot_name(slot->hotplug_slot);
43
+ return hotplug_slot_name(&slot->hotplug_slot);
44
+}
45
+
46
+static inline struct slot *to_slot(struct hotplug_slot *hotplug_slot)
47
+{
48
+ return container_of(hotplug_slot, struct slot, hotplug_slot);
4549 }
4650
4751 /*