@@ -1367,13 +1367,10 @@ static void cdns3_check_usb_interrupt_proceed(struct cdns3_device *priv_dev,
1367
1367
*/
1368
1368
static irqreturn_t cdns3_device_irq_handler (int irq , void * data )
1369
1369
{
1370
- struct cdns3_device * priv_dev ;
1371
- struct cdns3 * cdns = data ;
1370
+ struct cdns3_device * priv_dev = data ;
1372
1371
irqreturn_t ret = IRQ_NONE ;
1373
1372
u32 reg ;
1374
1373
1375
- priv_dev = cdns -> gadget_dev ;
1376
-
1377
1374
/* check USB device interrupt */
1378
1375
reg = readl (& priv_dev -> regs -> usb_ists );
1379
1376
if (reg ) {
@@ -1411,14 +1408,12 @@ static irqreturn_t cdns3_device_irq_handler(int irq, void *data)
1411
1408
*/
1412
1409
static irqreturn_t cdns3_device_thread_irq_handler (int irq , void * data )
1413
1410
{
1414
- struct cdns3_device * priv_dev ;
1415
- struct cdns3 * cdns = data ;
1411
+ struct cdns3_device * priv_dev = data ;
1416
1412
irqreturn_t ret = IRQ_NONE ;
1417
1413
unsigned long flags ;
1418
1414
int bit ;
1419
1415
u32 reg ;
1420
1416
1421
- priv_dev = cdns -> gadget_dev ;
1422
1417
spin_lock_irqsave (& priv_dev -> lock , flags );
1423
1418
1424
1419
reg = readl (& priv_dev -> regs -> usb_ists );
@@ -2508,7 +2503,7 @@ void cdns3_gadget_exit(struct cdns3 *cdns)
2508
2503
2509
2504
priv_dev = cdns -> gadget_dev ;
2510
2505
2511
- devm_free_irq (cdns -> dev , cdns -> dev_irq , cdns );
2506
+ devm_free_irq (cdns -> dev , cdns -> dev_irq , priv_dev );
2512
2507
2513
2508
pm_runtime_mark_last_busy (cdns -> dev );
2514
2509
pm_runtime_put_autosuspend (cdns -> dev );
@@ -2684,7 +2679,8 @@ static int __cdns3_gadget_init(struct cdns3 *cdns)
2684
2679
ret = devm_request_threaded_irq (cdns -> dev , cdns -> dev_irq ,
2685
2680
cdns3_device_irq_handler ,
2686
2681
cdns3_device_thread_irq_handler ,
2687
- IRQF_SHARED , dev_name (cdns -> dev ), cdns );
2682
+ IRQF_SHARED , dev_name (cdns -> dev ),
2683
+ cdns -> gadget_dev );
2688
2684
2689
2685
if (ret )
2690
2686
goto err0 ;
0 commit comments