[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180805200749.116693-9-toddpoynor@gmail.com>
Date: Sun, 5 Aug 2018 13:07:42 -0700
From: Todd Poynor <toddpoynor@...il.com>
To: Rob Springer <rspringer@...gle.com>,
John Joseph <jnjoseph@...gle.com>,
Ben Chan <benchan@...omium.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Todd Poynor <toddpoynor@...gle.com>
Subject: [PATCH 08/15] staging: gasket: apex: enable/disable gasket device from apex
From: Todd Poynor <toddpoynor@...gle.com>
Gasket framework now places device drivers in charge of calling APIs to
enable and disable gasket device operations. Make the appropriate calls
from the apex driver.
Signed-off-by: Todd Poynor <toddpoynor@...gle.com>
---
drivers/staging/gasket/apex_driver.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c
index e2bc06b5244f7..1d8a100c52885 100644
--- a/drivers/staging/gasket/apex_driver.c
+++ b/drivers/staging/gasket/apex_driver.c
@@ -643,11 +643,23 @@ static int apex_pci_probe(struct pci_dev *pci_dev,
return ret;
}
+ pci_set_drvdata(pci_dev, gasket_dev);
+ ret = gasket_enable_device(gasket_dev);
+ if (ret) {
+ dev_err(&pci_dev->dev, "error enabling gasket device\n");
+ gasket_pci_remove_device(pci_dev);
+ pci_disable_device(pci_dev);
+ return ret;
+ }
+
return 0;
}
static void apex_pci_remove(struct pci_dev *pci_dev)
{
+ struct gasket_dev *gasket_dev = pci_get_drvdata(pci_dev);
+
+ gasket_disable_device(gasket_dev);
gasket_pci_remove_device(pci_dev);
pci_disable_device(pci_dev);
}
--
2.18.0.597.ga71716f1ad-goog
Powered by blists - more mailing lists