Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: spidev: remove unnecessary spi_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.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>

authored by

Jingoo Han and committed by
Mark Brown
91a92e12 272b98c6

-1
-1
drivers/spi/spidev.c
··· 629 629 /* make sure ops on existing fds can abort cleanly */ 630 630 spin_lock_irq(&spidev->spi_lock); 631 631 spidev->spi = NULL; 632 - spi_set_drvdata(spi, NULL); 633 632 spin_unlock_irq(&spidev->spi_lock); 634 633 635 634 /* prevent new opens */