]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mfd: t7l66xb: Drop platform disable callback
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 30 May 2022 19:24:28 +0000 (21:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:09 +0000 (14:24 +0200)
[ Upstream commit 9de90edb7ccbe8eb08a70c68fbec16875cc4d197 ]

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: 005405a34b2b ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/t7l66xb.c
include/linux/mfd/t7l66xb.h

index 5369c67e3280d715c552edff3d3eea3d281fad4a..663ffd4b85706dd81cf720322b77c87dc1f3b8f8 100644 (file)
@@ -397,11 +397,8 @@ err_noirq:
 
 static int t7l66xb_remove(struct platform_device *dev)
 {
-       struct t7l66xb_platform_data *pdata = dev_get_platdata(&dev->dev);
        struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
-       int ret;
 
-       ret = pdata->disable(dev);
        clk_disable_unprepare(t7l66xb->clk48m);
        clk_put(t7l66xb->clk48m);
        clk_disable_unprepare(t7l66xb->clk32k);
@@ -412,8 +409,7 @@ static int t7l66xb_remove(struct platform_device *dev)
        mfd_remove_devices(&dev->dev);
        kfree(t7l66xb);
 
-       return ret;
-
+       return 0;
 }
 
 static struct platform_driver t7l66xb_platform_driver = {
index 69632c1b07bd8a31c8bab677fae48996511ddfdd..ae3e7a5c5219b59f9d2c0eed870bb1e9bbcb9d89 100644 (file)
@@ -12,7 +12,6 @@
 
 struct t7l66xb_platform_data {
        int (*enable)(struct platform_device *dev);
-       int (*disable)(struct platform_device *dev);
        int (*suspend)(struct platform_device *dev);
        int (*resume)(struct platform_device *dev);