m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/pci.c
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2018-05-05 10:50:12 +0200
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2018-05-05 10:50:12 +0200
commitfa5bb24685b585521ba7eb52c5d63da43f3e2436 (patch)
tree4a9eb5217531b785a6eba97842c63e24b69d110a /pci.c
parent0200874bc49dcd1f0a38b938dccc9c49a80b8daf (diff)
Start and shutdown harddoom device
Diffstat (limited to 'pci.c')
-rw-r--r--pci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pci.c b/pci.c
index f8626d9..833a72e 100644
--- a/pci.c
+++ b/pci.c
@@ -6,6 +6,7 @@
#include "char.h"
#include "harddoom.h"
#include "util.h"
+#include "harddoomdev.h"
int init_pci(struct pci_dev *dev) {
struct doom_data *doom_data;
@@ -53,11 +54,13 @@ int doom_probe(struct pci_dev *dev, const struct pci_device_id *id)
int err = 0;
ORFAIL(init_pci(dev), error_pci);
+ start_dev(dev);
ORFAIL(new_doomdev(dev), error_doomdev);
return 0;
error_doomdev:
+ shutdown_dev(dev);
cleanup_pci(dev);
error_pci:
return err;
@@ -70,6 +73,7 @@ void doom_remove (struct pci_dev *dev)
doom_data = pci_get_drvdata(dev);
destroy_doomdev(doom_data);
+ shutdown_dev(dev);
cleanup_pci(dev);
}