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

Configure Feed

Select the types of activity you want to include in your feed.

mfd: t7l66xb: Drop platform disable callback

None of the in-tree instantiations of struct t7l66xb_platform_data
provides a disable callback. So better don't dereference this function
pointer unconditionally. As there is no user, drop it completely instead
of calling it conditional.

This is a preparation for making platform remove callbacks return void.

Fixes: 1f192015ca5b ("mfd: driver for the T7L66XB TMIO SoC")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220530192430.2108217-3-u.kleine-koenig@pengutronix.de

authored by

Uwe Kleine-König and committed by
Lee Jones
128ac294 2598f6ec

+1 -6
+1 -5
drivers/mfd/t7l66xb.c
··· 397 397 398 398 static int t7l66xb_remove(struct platform_device *dev) 399 399 { 400 - struct t7l66xb_platform_data *pdata = dev_get_platdata(&dev->dev); 401 400 struct t7l66xb *t7l66xb = platform_get_drvdata(dev); 402 - int ret; 403 401 404 - ret = pdata->disable(dev); 405 402 clk_disable_unprepare(t7l66xb->clk48m); 406 403 clk_put(t7l66xb->clk48m); 407 404 clk_disable_unprepare(t7l66xb->clk32k); ··· 409 412 mfd_remove_devices(&dev->dev); 410 413 kfree(t7l66xb); 411 414 412 - return ret; 413 - 415 + return 0; 414 416 } 415 417 416 418 static struct platform_driver t7l66xb_platform_driver = {
-1
include/linux/mfd/t7l66xb.h
··· 12 12 13 13 struct t7l66xb_platform_data { 14 14 int (*enable)(struct platform_device *dev); 15 - int (*disable)(struct platform_device *dev); 16 15 int (*suspend)(struct platform_device *dev); 17 16 int (*resume)(struct platform_device *dev); 18 17