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

gpio: max77620: remove unneeded platform_set_drvdata() call

This function call is not required because no counterpart
platform_get_drvdata() call is present to leverage the private data of
the driver.
Since the private data is confined to this driver file, external access
is not feasible.
The use of this function appears redundant in the current context of the
driver's implementation.

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
ceac51b1 c518e7dc

-2
-2
drivers/gpio/gpio-max77620.c
··· 331 331 girq->init_hw = max77620_gpio_irq_init_hw; 332 332 girq->threaded = true; 333 333 334 - platform_set_drvdata(pdev, mgpio); 335 - 336 334 ret = devm_gpiochip_add_data(&pdev->dev, &mgpio->gpio_chip, mgpio); 337 335 if (ret < 0) { 338 336 dev_err(&pdev->dev, "gpio_init: Failed to add max77620_gpio\n");