Commit 5deeea33 authored by Tim Sell's avatar Tim Sell Committed by Greg Kroah-Hartman

staging: unisys: prevent faults in visornic_pause

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: default avatarTim Sell <Timothy.Sell@unisys.com>
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d01da5ea
...@@ -1831,6 +1831,7 @@ static int visornic_probe(struct visor_device *dev) ...@@ -1831,6 +1831,7 @@ static int visornic_probe(struct visor_device *dev)
} }
devdata->netdev = netdev; devdata->netdev = netdev;
dev_set_drvdata(&dev->device, devdata);
init_waitqueue_head(&devdata->rsp_queue); init_waitqueue_head(&devdata->rsp_queue);
spin_lock_init(&devdata->priv_lock); spin_lock_init(&devdata->priv_lock);
devdata->enabled = 0; /* not yet */ devdata->enabled = 0; /* not yet */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment