hc
2024-09-20 cf4ce59b3b70238352c7f1729f0f7223214828ad
kernel/kernel/irq/devres.c
....@@ -84,8 +84,6 @@
8484 * @dev: device to request interrupt for
8585 * @irq: Interrupt line to allocate
8686 * @handler: Function to be called when the IRQ occurs
87
- * @thread_fn: function to be called in a threaded interrupt context. NULL
88
- * for devices which handle everything in @handler
8987 * @irqflags: Interrupt type flags
9088 * @devname: An ascii name for the claiming device, dev_name(dev) if NULL
9189 * @dev_id: A cookie passed back to the handler function
....@@ -169,7 +167,7 @@
169167 * @cnt: Number of consecutive irqs to allocate
170168 * @node: Preferred node on which the irq descriptor should be allocated
171169 * @owner: Owning module (can be NULL)
172
- * @affinity: Optional pointer to an affinity mask array of size @cnt
170
+ * @affinity: Optional pointer to an irq_affinity_desc array of size @cnt
173171 * which hints where the irq descriptors should be allocated
174172 * and which default affinities to use
175173 *
....@@ -179,7 +177,7 @@
179177 */
180178 int __devm_irq_alloc_descs(struct device *dev, int irq, unsigned int from,
181179 unsigned int cnt, int node, struct module *owner,
182
- const struct cpumask *affinity)
180
+ const struct irq_affinity_desc *affinity)
183181 {
184182 struct irq_desc_devres *dr;
185183 int base;
....@@ -222,9 +220,8 @@
222220 irq_flow_handler_t handler)
223221 {
224222 struct irq_chip_generic *gc;
225
- unsigned long sz = sizeof(*gc) + num_ct * sizeof(struct irq_chip_type);
226223
227
- gc = devm_kzalloc(dev, sz, GFP_KERNEL);
224
+ gc = devm_kzalloc(dev, struct_size(gc, chip_types, num_ct), GFP_KERNEL);
228225 if (gc)
229226 irq_init_generic_chip(gc, name, num_ct,
230227 irq_base, reg_base, handler);