Skip to content

staging: Remove unnecessary *_set_drvdata()

Amitoj Kaur Chawla outreachy 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6staging: fbtft: Remove unnecessary spi_set_drvdata()drivers/staging/fbtft/fbtft-core.c+0 -50 replies
2/6staging: sm750fb: Remove unnecessary pci_set_drvdata()drivers/staging/sm750fb/sm750.c+0 -10 replies
3/6staging: media: omap4iss: Remove unnecessary platform_set_drvdata()drivers/staging/media/omap4iss/iss.c+0 -20 replies
4/6staging: unisys: visorbus: Remove unnecessary dev_set_drvdata()drivers/staging/unisys/visorbus/visorbus_main.c+0 -10 replies
5/6staging: rdma: hfi1: Remove unnecessary pci_set_drvdata()drivers/staging/rdma/hfi1/pcie.c+0 -20 replies
6/6staging: rts5208: Remove unnecessary pci_set_drvdata()drivers/staging/rts5208/rtsx.c+0 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] staging: Remove unnecessary *_set_drvdata()

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(-)
Signature · 1 line
1.9.1