]> git.baikalelectronics.ru Git - kernel.git/commit
spi: Clean up probe and remove functions
authorJean Delvare <jdelvare@suse.de>
Thu, 13 Feb 2014 14:28:41 +0000 (15:28 +0100)
committerMark Brown <broonie@linaro.org>
Fri, 14 Feb 2014 14:59:45 +0000 (14:59 +0000)
commitc2b49e79f1c3990d02a44d903b1a9f94f1e6f509
tree5a71454cba1892491c9ab02a9e1d091fefe67747
parent6333ef0a6d756a72c48035feae2450b64f0372e4
spi: Clean up probe and remove functions

While backporting 9b8a834e ("spi: attach/detach SPI device to the ACPI
power domain"), I noticed that the code changes were suboptimal:

* Why use &spi->dev when we have dev at hand?

* After fixing the above, spi is used only once, so we don't really
  need a local variable for it.

This results in the following clean-up.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi.c