forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/pci/tw686x/tw686x-core.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2015 VanguardiaSur - www.vanguardiasur.com.ar
34 *
45 * Based on original driver by Krzysztof Ha?asa:
56 * Copyright (C) 2015 Industrial Research Institute for Automation
67 * and Measurements PIAP
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms of version 2 of the GNU General Public License
10
- * as published by the Free Software Foundation.
118 *
129 * Notes
1310 * -----
....@@ -318,13 +315,6 @@
318315
319316 spin_lock_init(&dev->lock);
320317
321
- err = request_irq(pci_dev->irq, tw686x_irq, IRQF_SHARED,
322
- dev->name, dev);
323
- if (err < 0) {
324
- dev_err(&pci_dev->dev, "unable to request interrupt\n");
325
- goto iounmap;
326
- }
327
-
328318 timer_setup(&dev->dma_delay_timer, tw686x_dma_delay, 0);
329319
330320 /*
....@@ -336,18 +326,23 @@
336326 err = tw686x_video_init(dev);
337327 if (err) {
338328 dev_err(&pci_dev->dev, "can't register video\n");
339
- goto free_irq;
329
+ goto iounmap;
340330 }
341331
342332 err = tw686x_audio_init(dev);
343333 if (err)
344334 dev_warn(&pci_dev->dev, "can't register audio\n");
345335
336
+ err = request_irq(pci_dev->irq, tw686x_irq, IRQF_SHARED,
337
+ dev->name, dev);
338
+ if (err < 0) {
339
+ dev_err(&pci_dev->dev, "unable to request interrupt\n");
340
+ goto iounmap;
341
+ }
342
+
346343 pci_set_drvdata(pci_dev, dev);
347344 return 0;
348345
349
-free_irq:
350
- free_irq(pci_dev->irq, dev);
351346 iounmap:
352347 pci_iounmap(pci_dev, dev->mmio);
353348 free_region: