diff mbox series

spi: pxa2xx: Remove the shutdown callback

Message ID 20180917121124.21305-1-lkundrak@v3.sk (mailing list archive)
State Accepted
Commit 8089babee17c09cdd51ac1390e444ee0be0c2291
Headers show
Series spi: pxa2xx: Remove the shutdown callback | expand

Commit Message

Lubomir Rintel Sept. 17, 2018, 12:11 p.m. UTC
It makes no sense to remove the device on shutdown. And it break things
when the hardware crucial for shutdown (such as the embedded controller)
is attached to the SPI bus.

Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
 drivers/spi/spi-pxa2xx.c | 9 ---------
 1 file changed, 9 deletions(-)

Comments

Pavel Machek Nov. 3, 2018, 7:13 p.m. UTC | #1
On Mon 2018-09-17 14:11:24, Lubomir Rintel wrote:
> It makes no sense to remove the device on shutdown. And it break things
> when the hardware crucial for shutdown (such as the embedded controller)
> is attached to the SPI bus.

Again, are you sure?

On some hardware (sharp zaurus, phones) it is good idea to shut down
hardware before poweroff, as they don't have embedded controller that
would cut the power.

Will this increase power consumption while "off" on such platforms?
									Pavel

> Cc: Daniel Mack <daniel@zonque.org>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> Cc: Robert Jarzmik <robert.jarzmik@free.fr>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> ---
>  drivers/spi/spi-pxa2xx.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
> index 14f4ea59caff..b06f37fb29f6 100644
> --- a/drivers/spi/spi-pxa2xx.c
> +++ b/drivers/spi/spi-pxa2xx.c
> @@ -1764,14 +1764,6 @@ static int pxa2xx_spi_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static void pxa2xx_spi_shutdown(struct platform_device *pdev)
> -{
> -	int status = 0;
> -
> -	if ((status = pxa2xx_spi_remove(pdev)) != 0)
> -		dev_err(&pdev->dev, "shutdown failed with %d\n", status);
> -}
> -
>  #ifdef CONFIG_PM_SLEEP
>  static int pxa2xx_spi_suspend(struct device *dev)
>  {
> @@ -1851,7 +1843,6 @@ static struct platform_driver driver = {
>  	},
>  	.probe = pxa2xx_spi_probe,
>  	.remove = pxa2xx_spi_remove,
> -	.shutdown = pxa2xx_spi_shutdown,
>  };
>  
>  static int __init pxa2xx_spi_init(void)
diff mbox series

Patch

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 14f4ea59caff..b06f37fb29f6 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1764,14 +1764,6 @@  static int pxa2xx_spi_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static void pxa2xx_spi_shutdown(struct platform_device *pdev)
-{
-	int status = 0;
-
-	if ((status = pxa2xx_spi_remove(pdev)) != 0)
-		dev_err(&pdev->dev, "shutdown failed with %d\n", status);
-}
-
 #ifdef CONFIG_PM_SLEEP
 static int pxa2xx_spi_suspend(struct device *dev)
 {
@@ -1851,7 +1843,6 @@  static struct platform_driver driver = {
 	},
 	.probe = pxa2xx_spi_probe,
 	.remove = pxa2xx_spi_remove,
-	.shutdown = pxa2xx_spi_shutdown,
 };
 
 static int __init pxa2xx_spi_init(void)