projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67b6616
)
leds: spi-byte: Utilise temporary variable for struct device
author
Andy Shevchenko
<andriy.shevchenko@linux.intel.com>
Thu, 6 Jun 2024 17:29:21 +0000
(20:29 +0300)
committer
Lee Jones
<lee@kernel.org>
Wed, 26 Jun 2024 15:56:05 +0000
(16:56 +0100)
We have a temporary variable to keep a pointer to struct device.
Utilise it where it makes sense.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link:
https://lore.kernel.org/r/20240606173037.3091598-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/leds-spi-byte.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/leds/leds-spi-byte.c
b/drivers/leds/leds-spi-byte.c
index 1fc0a8cc123e19a080b3bbefc8d0f68e9aee5df1..e63958e584c2c2358dea3154d438b4e025f849d0 100644
(file)
--- a/
drivers/leds/leds-spi-byte.c
+++ b/
drivers/leds/leds-spi-byte.c
@@
-116,7
+116,7
@@
static int spi_byte_probe(struct spi_device *spi)
init_data.devicename = "leds-spi-byte";
init_data.default_label = ":";
- ret = devm_led_classdev_register_ext(
&spi->
dev, &led->ldev, &init_data);
+ ret = devm_led_classdev_register_ext(dev, &led->ldev, &init_data);
if (ret) {
mutex_destroy(&led->mutex);
return ret;