File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -2874,9 +2874,6 @@ void device_initialize(struct device *dev)
2874
2874
INIT_LIST_HEAD (& dev -> devres_head );
2875
2875
device_pm_init (dev );
2876
2876
set_dev_node (dev , NUMA_NO_NODE );
2877
- #ifdef CONFIG_GENERIC_MSI_IRQ
2878
- INIT_LIST_HEAD (& dev -> msi_list );
2879
- #endif
2880
2877
INIT_LIST_HEAD (& dev -> links .consumers );
2881
2878
INIT_LIST_HEAD (& dev -> links .suppliers );
2882
2879
INIT_LIST_HEAD (& dev -> links .defer_sync );
Original file line number Diff line number Diff line change @@ -423,7 +423,6 @@ struct dev_msi_info {
423
423
* @pins: For device pin management.
424
424
* See Documentation/driver-api/pin-control.rst for details.
425
425
* @msi: MSI related data
426
- * @msi_list: Hosts MSI descriptors
427
426
* @numa_node: NUMA node this device is close to.
428
427
* @dma_ops: DMA mapping operations for this device.
429
428
* @dma_mask: Dma mask (if dma'ble device).
@@ -519,9 +518,6 @@ struct device {
519
518
struct dev_pin_info * pins ;
520
519
#endif
521
520
struct dev_msi_info msi ;
522
- #ifdef CONFIG_GENERIC_MSI_IRQ
523
- struct list_head msi_list ;
524
- #endif
525
521
#ifdef CONFIG_DMA_OPS
526
522
const struct dma_map_ops * dma_ops ;
527
523
#endif
Original file line number Diff line number Diff line change @@ -144,11 +144,13 @@ struct msi_desc {
144
144
* @properties: MSI properties which are interesting to drivers
145
145
* @attrs: Pointer to the sysfs attribute group
146
146
* @platform_data: Platform-MSI specific data
147
+ * @list: List of MSI descriptors associated to the device
147
148
*/
148
149
struct msi_device_data {
149
150
unsigned long properties ;
150
151
const struct attribute_group * * attrs ;
151
152
struct platform_msi_priv_data * platform_data ;
153
+ struct list_head list ;
152
154
};
153
155
154
156
int msi_setup_device_data (struct device * dev );
@@ -157,7 +159,7 @@ unsigned int msi_get_virq(struct device *dev, unsigned int index);
157
159
158
160
/* Helpers to hide struct msi_desc implementation details */
159
161
#define msi_desc_to_dev (desc ) ((desc)->dev)
160
- #define dev_to_msi_list (dev ) (&(dev)->msi_list )
162
+ #define dev_to_msi_list (dev ) (&(dev)->msi.data->list )
161
163
#define first_msi_entry (dev ) \
162
164
list_first_entry(dev_to_msi_list((dev)), struct msi_desc, list)
163
165
#define for_each_msi_entry (desc , dev ) \
Original file line number Diff line number Diff line change @@ -75,7 +75,9 @@ EXPORT_SYMBOL_GPL(get_cached_msi_msg);
75
75
76
76
static void msi_device_data_release (struct device * dev , void * res )
77
77
{
78
- WARN_ON_ONCE (!list_empty (& dev -> msi_list ));
78
+ struct msi_device_data * md = res ;
79
+
80
+ WARN_ON_ONCE (!list_empty (& md -> list ));
79
81
dev -> msi .data = NULL ;
80
82
}
81
83
@@ -100,6 +102,7 @@ int msi_setup_device_data(struct device *dev)
100
102
if (!md )
101
103
return - ENOMEM ;
102
104
105
+ INIT_LIST_HEAD (& md -> list );
103
106
dev -> msi .data = md ;
104
107
devres_add (dev , md );
105
108
return 0 ;
You can’t perform that action at this time.
0 commit comments