hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/pci/hotplug/shpchp.h
....@@ -67,11 +67,13 @@
6767 u32 number;
6868 u8 is_a_board;
6969 u8 state;
70
+ u8 attention_save;
7071 u8 presence_save;
72
+ u8 latch_save;
7173 u8 pwr_save;
7274 struct controller *ctrl;
7375 const struct hpc_ops *hpc_ops;
74
- struct hotplug_slot *hotplug_slot;
76
+ struct hotplug_slot hotplug_slot;
7577 struct list_head slot_list;
7678 struct delayed_work work; /* work for button event */
7779 struct mutex lock;
....@@ -162,14 +164,14 @@
162164 u8 shpchp_handle_presence_change(u8 hp_slot, struct controller *ctrl);
163165 u8 shpchp_handle_power_fault(u8 hp_slot, struct controller *ctrl);
164166 int shpchp_configure_device(struct slot *p_slot);
165
-int shpchp_unconfigure_device(struct slot *p_slot);
167
+void shpchp_unconfigure_device(struct slot *p_slot);
166168 void cleanup_slots(struct controller *ctrl);
167169 void shpchp_queue_pushbutton_work(struct work_struct *work);
168170 int shpc_init(struct controller *ctrl, struct pci_dev *pdev);
169171
170172 static inline const char *slot_name(struct slot *slot)
171173 {
172
- return hotplug_slot_name(slot->hotplug_slot);
174
+ return hotplug_slot_name(&slot->hotplug_slot);
173175 }
174176
175177 struct ctrl_reg {
....@@ -207,7 +209,7 @@
207209
208210 static inline struct slot *get_slot(struct hotplug_slot *hotplug_slot)
209211 {
210
- return hotplug_slot->private;
212
+ return container_of(hotplug_slot, struct slot, hotplug_slot);
211213 }
212214
213215 static inline struct slot *shpchp_find_slot(struct controller *ctrl, u8 device)