Skip to contentSkip to conversation

video: asiliantfb: remove unnecessary pci_set_drvdata()

PATCH RESEND In review Jingoo Han 2 participants 2 messages Jan 8, 2014 Framebuffer layer

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH RESEND 1/4 video: asiliantfb: 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/video/asiliantfb.c |    1 -
 1 file changed, 1 deletion(-)
drivers/video/asiliantfb.c +0 -1
index d611f1a..7e8ddf0 100644
@@ -589,7 +589,6 @@ static void asiliantfb_remove(struct pci_dev *dp)
 	fb_dealloc_cmap(&p->cmap);
 	iounmap(p->screen_base);
 	release_mem_region(pci_resource_start(dp, 0), pci_resource_len(dp, 0));
-	pci_set_drvdata(dp, NULL);
 	framebuffer_release(p);
 }
 
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 15 lines · 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/video/asiliantfb.c |    1 -
 1 file changed, 1 deletion(-)
drivers/video/asiliantfb.c +0 -0
index d611f1a..7e8ddf0 100644

drivers/video/asiliantfb.c static void asiliantfb_remove(struct pci_dev *dp) · line 594

Quoted 7 lines
drivers/video/asiliantfb.c +0 -1
@@ -589,7 +589,6 @@ static void asiliantfb_remove(struct pci_dev *dp)
 	fb_dealloc_cmap(&p->cmap);
 	iounmap(p->screen_base);
 	release_mem_region(pci_resource_start(dp, 0), pci_resource_len(dp, 0));
-	pci_set_drvdata(dp, NULL);
 	framebuffer_release(p);
 }
 

Series queued for 3.14.

Tomi