mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 12:14:10 +08:00
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>
This commit is contained in:
parent
c456c4d970
commit
c518e7dc64
@ -199,8 +199,6 @@ static int lp3943_gpio_probe(struct platform_device *pdev)
|
||||
lp3943_gpio->chip = lp3943_gpio_chip;
|
||||
lp3943_gpio->chip.parent = &pdev->dev;
|
||||
|
||||
platform_set_drvdata(pdev, lp3943_gpio);
|
||||
|
||||
return devm_gpiochip_add_data(&pdev->dev, &lp3943_gpio->chip,
|
||||
lp3943_gpio);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user