]> git.karo-electronics.de Git - linux-beck.git/commit
staging: fbtft: Remove unnecessary spi_set_drvdata()
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Thu, 25 Feb 2016 05:37:28 +0000 (11:07 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
commit71e03f10384c16887d5dd32c6b1e7006b09ec592
treef487d256a3566a5d31ed6d588a618118da3d787d
parent3589d3c9e39889fcac8fa0cb9f5bb3006d7d0d51
staging: fbtft: Remove unnecessary spi_set_drvdata()

Unnecessary spi_set_drvdata() has 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:
@@
struct spi_device *spi;
@@
- spi_set_drvdata(spi, NULL);
// </smpl>

Due to this removal, variable `spi` was unused so dropped `spi`

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft-core.c