diff options
| author | Kishon Vijay Abraham I <[email protected]> | 2020-03-17 10:01:55 +0000 |
|---|---|---|
| committer | Lorenzo Pieralisi <[email protected]> | 2020-04-02 16:57:10 +0000 |
| commit | 475007f9cef0ef88ea9263529ad93a16849c49e8 (patch) | |
| tree | d6474125b23781786c15a715c41b68193da535c8 /drivers/misc/pci_endpoint_test.c | |
| parent | misc: pci_endpoint_test: Avoid using module parameter to determine irqtype (diff) | |
| download | kernel-475007f9cef0ef88ea9263529ad93a16849c49e8.tar.gz kernel-475007f9cef0ef88ea9263529ad93a16849c49e8.zip | |
misc: pci_endpoint_test: Add ioctl to clear IRQ
Add ioctl to clear IRQ which can be used to free the allocated
IRQ vectors and free the requested IRQ.
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Diffstat (limited to 'drivers/misc/pci_endpoint_test.c')
| -rw-r--r-- | drivers/misc/pci_endpoint_test.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index ca680635d7a9..bb8b94ac8d3b 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -652,6 +652,13 @@ err: return ret; } +static bool pci_endpoint_test_clear_irq(struct pci_endpoint_test *test) +{ + pci_endpoint_test_release_irq(test); + pci_endpoint_test_free_irq_vectors(test); + return true; +} + static bool pci_endpoint_test_set_irq(struct pci_endpoint_test *test, int req_irq_type) { @@ -722,6 +729,9 @@ static long pci_endpoint_test_ioctl(struct file *file, unsigned int cmd, case PCITEST_GET_IRQTYPE: ret = irq_type; break; + case PCITEST_CLEAR_IRQ: + ret = pci_endpoint_test_clear_irq(test); + break; } ret: |
