aboutsummaryrefslogtreecommitdiff
path: root/samples/gpio-pci-idio-16.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/gpio-pci-idio-16.c')
-rw-r--r--samples/gpio-pci-idio-16.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/samples/gpio-pci-idio-16.c b/samples/gpio-pci-idio-16.c
index 3c87103..06320f3 100644
--- a/samples/gpio-pci-idio-16.c
+++ b/samples/gpio-pci-idio-16.c
@@ -65,6 +65,12 @@ static void _sa_handler(int signum __attribute__((unused)))
{
}
+static int
+unmap_dma(void *pvt __attribute__((unused)),
+ uint64_t iova __attribute__((unused)))
+{
+}
+
int main(int argc, char *argv[])
{
int ret;
@@ -105,6 +111,13 @@ int main(int argc, char *argv[])
.irq_count[LM_DEV_INTX_IRQ_IDX] = 1,
},
.uuid = argv[optind],
+
+ /*
+ * Not strictly necessary since this device doesn't yet do any DMA.
+ * By declaring this dummy callback DMA regions get registered,
+ * otherwise they're ignored.
+ */
+ .unmap_dma = unmap_dma
};
sigemptyset(&act.sa_mask);