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

gpio: lp3943: remove unneeded platform_set_drvdata() call

This function call was found to be unnecessary as there is no equivalent
platform_get_drvdata() call, to access the private data of the driver.
Also, the private data is defined in this driver, so there is no risk of
it being accessed outside of this driver file.

Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

authored by

Andrei Coardos and committed by
Bartosz Golaszewski
c518e7dc c456c4d9

-2
-2
drivers/gpio/gpio-lp3943.c
··· 199 199 lp3943_gpio->chip = lp3943_gpio_chip; 200 200 lp3943_gpio->chip.parent = &pdev->dev; 201 201 202 - platform_set_drvdata(pdev, lp3943_gpio); 203 - 204 202 return devm_gpiochip_add_data(&pdev->dev, &lp3943_gpio->chip, 205 203 lp3943_gpio); 206 204 }