Skip to contentSkip to conversation

mtd: intel_vr_nor: remove unnecessary pci_set_drvdata()

PATCH In review Jingoo Han 2 participants 5 messages Sep 23, 2013 – Oct 7, 2013

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/4 mtd: intel_vr_nor: remove unnecessary pci_set_drvdata()

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.

---
 drivers/mtd/maps/intel_vr_nor.c |    1 -
 1 file changed, 1 deletion(-)
drivers/mtd/maps/intel_vr_nor.c +0 -1
index f581ac1..46d195f 100644
@@ -180,7 +180,6 @@ static void vr_nor_pci_remove(struct pci_dev *dev)
 {
 	struct vr_nor_mtd *p = pci_get_drvdata(dev);
 
-	pci_set_drvdata(dev, NULL);
 	vr_nor_destroy_partitions(p);
 	vr_nor_destroy_mtd_setup(p);
 	vr_nor_destroy_maps(p);
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 2/4 mtd: pci: remove unnecessary pci_set_drvdata()

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.

---
 drivers/mtd/maps/pci.c |    1 -
 1 file changed, 1 deletion(-)
drivers/mtd/maps/pci.c +0 -1
index c2604f8..36da518 100644
@@ -316,7 +316,6 @@ static void mtd_pci_remove(struct pci_dev *dev)
 	map->exit(dev, map);
 	kfree(map);
 
-	pci_set_drvdata(dev, NULL);
 	pci_release_regions(dev);
 }
 
Signature · 1 line
1.7.10.4
author
#2 lore raw

PATCH 3/4 mtd: scb2_flash: remove unnecessary pci_set_drvdata()

In reply to Jingoo Han

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.

---
 drivers/mtd/maps/scb2_flash.c |    1 -
 1 file changed, 1 deletion(-)
drivers/mtd/maps/scb2_flash.c +0 -1
index c77b68c..3051c4c 100644
@@ -212,7 +212,6 @@ static void scb2_flash_remove(struct pci_dev *dev)
 
 	if (!region_fail)
 		release_mem_region(SCB2_ADDR, SCB2_WINDOW);
-	pci_set_drvdata(dev, NULL);
 }
 
 static struct pci_device_id scb2_flash_pci_ids[] = {
Signature · 1 line
1.7.10.4
author
#3 lore raw

PATCH 4/4 mtd: denali: remove unnecessary pci_set_drvdata()

In reply to Jingoo Han

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.

---
 drivers/mtd/nand/denali_pci.c |    1 -
 1 file changed, 1 deletion(-)
drivers/mtd/nand/denali_pci.c +0 -1
index e3e4662..033f177 100644
@@ -119,7 +119,6 @@ static void denali_pci_remove(struct pci_dev *dev)
 	iounmap(denali->flash_mem);
 	pci_release_regions(dev);
 	pci_disable_device(dev);
-	pci_set_drvdata(dev, NULL);
 	kfree(denali);
 }
 
Signature · 1 line
1.7.10.4