[Linux-parport] [PATCH 2/2] parport_pc: remove unnecessary pci_set_drvdata()

Jingoo Han jg1.han at samsung.com
Sun Nov 24 21:17:57 EST 2013


The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han at samsung.com>
---
 drivers/parport/parport_pc.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index 9637615..6f5205e 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -2866,8 +2866,6 @@ static void parport_pc_pci_remove(struct pci_dev *dev)
 	struct pci_parport_data *data = pci_get_drvdata(dev);
 	int i;
 
-	pci_set_drvdata(dev, NULL);
-
 	if (data) {
 		for (i = data->num - 1; i >= 0; i--)
 			parport_pc_unregister_port(data->ports[i]);
-- 
1.7.10.4





More information about the Linux-parport mailing list