From: Tim Sell <timothy.s...@unisys.com> Prevent faults in visornic_pause, visornic_resume(), and visornic_remove()
Prior to this patch, any call to visornic_pause(), visornic_resume(), or visornic_remove() would fault, due to dev_set_drvdata() never having been called to stash our struct visornic_devdata * into the device's drvdata. I.e., all calls to dev_get_drvdata() were returning NULL, meaning a fault was soon to follow. Signed-off-by: Tim Sell <timothy.s...@unisys.com> Signed-off-by: Benjamin Romer <benjamin.ro...@unisys.com> --- drivers/staging/unisys/visornic/visornic_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index fa52e0f..72253a0 100644 --- a/drivers/staging/unisys/visornic/visornic_main.c +++ b/drivers/staging/unisys/visornic/visornic_main.c @@ -1831,6 +1831,7 @@ static int visornic_probe(struct visor_device *dev) } devdata->netdev = netdev; + dev_set_drvdata(&dev->device, devdata); init_waitqueue_head(&devdata->rsp_queue); spin_lock_init(&devdata->priv_lock); devdata->enabled = 0; /* not yet */ -- 2.1.4 _______________________________________________ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel