@@ -1375,13 +1375,10 @@ static void cdns3_check_usb_interrupt_proceed(struct cdns3_device *priv_dev,
1375
1375
*/
1376
1376
static irqreturn_t cdns3_device_irq_handler (int irq , void * data )
1377
1377
{
1378
- struct cdns3_device * priv_dev ;
1379
- struct cdns3 * cdns = data ;
1378
+ struct cdns3_device * priv_dev = data ;
1380
1379
irqreturn_t ret = IRQ_NONE ;
1381
1380
u32 reg ;
1382
1381
1383
- priv_dev = cdns -> gadget_dev ;
1384
-
1385
1382
/* check USB device interrupt */
1386
1383
reg = readl (& priv_dev -> regs -> usb_ists );
1387
1384
if (reg ) {
@@ -1419,14 +1416,12 @@ static irqreturn_t cdns3_device_irq_handler(int irq, void *data)
1419
1416
*/
1420
1417
static irqreturn_t cdns3_device_thread_irq_handler (int irq , void * data )
1421
1418
{
1422
- struct cdns3_device * priv_dev ;
1423
- struct cdns3 * cdns = data ;
1419
+ struct cdns3_device * priv_dev = data ;
1424
1420
irqreturn_t ret = IRQ_NONE ;
1425
1421
unsigned long flags ;
1426
1422
int bit ;
1427
1423
u32 reg ;
1428
1424
1429
- priv_dev = cdns -> gadget_dev ;
1430
1425
spin_lock_irqsave (& priv_dev -> lock , flags );
1431
1426
1432
1427
reg = readl (& priv_dev -> regs -> usb_ists );
@@ -2539,7 +2534,7 @@ void cdns3_gadget_exit(struct cdns3 *cdns)
2539
2534
2540
2535
priv_dev = cdns -> gadget_dev ;
2541
2536
2542
- devm_free_irq (cdns -> dev , cdns -> dev_irq , cdns );
2537
+ devm_free_irq (cdns -> dev , cdns -> dev_irq , priv_dev );
2543
2538
2544
2539
pm_runtime_mark_last_busy (cdns -> dev );
2545
2540
pm_runtime_put_autosuspend (cdns -> dev );
@@ -2710,7 +2705,8 @@ static int __cdns3_gadget_init(struct cdns3 *cdns)
2710
2705
ret = devm_request_threaded_irq (cdns -> dev , cdns -> dev_irq ,
2711
2706
cdns3_device_irq_handler ,
2712
2707
cdns3_device_thread_irq_handler ,
2713
- IRQF_SHARED , dev_name (cdns -> dev ), cdns );
2708
+ IRQF_SHARED , dev_name (cdns -> dev ),
2709
+ cdns -> gadget_dev );
2714
2710
2715
2711
if (ret )
2716
2712
goto err0 ;
0 commit comments