File tree 1 file changed +11
-6
lines changed
drivers/net/wireless/ti/wlcore
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -285,7 +285,7 @@ static int wl1271_probe(struct sdio_func *func,
285
285
struct resource res [2 ];
286
286
mmc_pm_flag_t mmcflags ;
287
287
int ret = - ENOMEM ;
288
- int irq , wakeirq ;
288
+ int irq , wakeirq , num_irqs ;
289
289
const char * chip_family ;
290
290
291
291
/* We are only able to handle the wlan function */
@@ -353,12 +353,17 @@ static int wl1271_probe(struct sdio_func *func,
353
353
irqd_get_trigger_type (irq_get_irq_data (irq ));
354
354
res [0 ].name = "irq" ;
355
355
356
- res [1 ].start = wakeirq ;
357
- res [1 ].flags = IORESOURCE_IRQ |
358
- irqd_get_trigger_type (irq_get_irq_data (wakeirq ));
359
- res [1 ].name = "wakeirq" ;
360
356
361
- ret = platform_device_add_resources (glue -> core , res , ARRAY_SIZE (res ));
357
+ if (wakeirq > 0 ) {
358
+ res [1 ].start = wakeirq ;
359
+ res [1 ].flags = IORESOURCE_IRQ |
360
+ irqd_get_trigger_type (irq_get_irq_data (wakeirq ));
361
+ res [1 ].name = "wakeirq" ;
362
+ num_irqs = 2 ;
363
+ } else {
364
+ num_irqs = 1 ;
365
+ }
366
+ ret = platform_device_add_resources (glue -> core , res , num_irqs );
362
367
if (ret ) {
363
368
dev_err (glue -> dev , "can't add resources\n" );
364
369
goto out_dev_put ;
You can’t perform that action at this time.
0 commit comments