All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] staging: Remove unnecessary *_set_drvdata()
@ 2016-02-25  5:37 Amitoj Kaur Chawla
  2016-02-25  5:37 ` [PATCH 1/6] staging: fbtft: Remove unnecessary spi_set_drvdata() Amitoj Kaur Chawla
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Amitoj Kaur Chawla @ 2016-02-25  5:37 UTC (permalink / raw)
  To: outreachy-kernel

Unnecessary [platform|pci|spi|dev]_set_drvdata() have been removed 
since the driver core clears the driver data to NULL after device 
release or on probe failure. There is no need to manually clear the 
device driver data to NULL.

The Coccinelle semantic patch used to make this change is as follows:
// <smpl>
@@
struct platform_device *pdev;
@@
- platform_set_drvdata(pdev, NULL);
@@
struct pci_dev *pci;
@@
- pci_set_drvdata(pci, NULL);
@@
struct spi_device *spi;
@@
- spi_set_drvdata(spi, NULL);
@@
struct device *dev;
@@
- dev_set_drvdata(dev, NULL);
@@
struct amba_device *dev;
@@
- amba_set_drvdata(dev, NULL);
// </smpl>

Amitoj Kaur Chawla (6):
  staging: fbtft: Remove unnecessary spi_set_drvdata()
  staging: sm750fb: Remove unnecessary pci_set_drvdata()
  staging: media: omap4iss: Remove unnecessary platform_set_drvdata()
  staging: unisys: visorbus: Remove unnecessary dev_set_drvdata()
  staging: rdma: hfi1: Remove unnecessary pci_set_drvdata()
  staging: rts5208: Remove unnecessary pci_set_drvdata()

 drivers/staging/fbtft/fbtft-core.c              | 5 -----
 drivers/staging/media/omap4iss/iss.c            | 2 --
 drivers/staging/rdma/hfi1/pcie.c                | 2 --
 drivers/staging/rts5208/rtsx.c                  | 2 --
 drivers/staging/sm750fb/sm750.c                 | 1 -
 drivers/staging/unisys/visorbus/visorbus_main.c | 1 -
 6 files changed, 13 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-02-25  7:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-25  5:37 [PATCH 0/6] staging: Remove unnecessary *_set_drvdata() Amitoj Kaur Chawla
2016-02-25  5:37 ` [PATCH 1/6] staging: fbtft: Remove unnecessary spi_set_drvdata() Amitoj Kaur Chawla
2016-02-25  5:37 ` [PATCH 2/6] staging: sm750fb: Remove unnecessary pci_set_drvdata() Amitoj Kaur Chawla
2016-02-25  5:37 ` [PATCH 3/6] staging: media: omap4iss: Remove unnecessary platform_set_drvdata() Amitoj Kaur Chawla
2016-02-25  5:37 ` [PATCH 4/6] staging: unisys: visorbus: Remove unnecessary dev_set_drvdata() Amitoj Kaur Chawla
2016-02-25  5:38 ` [PATCH 5/6] staging: rdma: hfi1: Remove unnecessary pci_set_drvdata() Amitoj Kaur Chawla
2016-02-25  5:38 ` [PATCH 6/6] staging: rts5208: " Amitoj Kaur Chawla
2016-02-25  7:09 ` [Outreachy kernel] [PATCH 0/6] staging: Remove unnecessary *_set_drvdata() Julia Lawall
2016-02-25  7:15   ` Amitoj Kaur Chawla
2016-02-25  7:29     ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.