ar71xx: add preliminary support for Mikrotik RB2011L
[openwrt/svn-archive/archive.git] / target / linux / ar71xx / patches-3.3 / 205-spi-ath79-add-shutdown-handler.patch
1 From dab305def68a9ea28c1c0ca2fc20bba645944914 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Wed, 11 Jan 2012 22:19:32 +0100
4 Subject: [PATCH 33/34] spi/ath79: add shutdown handler
5
6 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
7 ---
8 drivers/spi/spi-ath79.c | 12 +++++++++++-
9 1 files changed, 11 insertions(+), 1 deletions(-)
10
11 --- a/drivers/spi/spi-ath79.c
12 +++ b/drivers/spi/spi-ath79.c
13 @@ -296,7 +296,7 @@ err_put_master:
14 return ret;
15 }
16
17 -static __devexit int ath79_spi_remove(struct platform_device *pdev)
18 +static void __ath79_spi_remove(struct platform_device *pdev)
19 {
20 struct ath79_spi *sp = platform_get_drvdata(pdev);
21
22 @@ -307,13 +307,23 @@ static __devexit int ath79_spi_remove(st
23 iounmap(sp->base);
24 platform_set_drvdata(pdev, NULL);
25 spi_master_put(sp->bitbang.master);
26 +}
27
28 +static __devexit int ath79_spi_remove(struct platform_device *pdev)
29 +{
30 + __ath79_spi_remove(pdev);
31 return 0;
32 }
33
34 +static void ath79_spi_shutdown(struct platform_device *pdev)
35 +{
36 + __ath79_spi_remove(pdev);
37 +}
38 +
39 static struct platform_driver ath79_spi_driver = {
40 .probe = ath79_spi_probe,
41 .remove = __devexit_p(ath79_spi_remove),
42 + .shutdown = ath79_spi_shutdown,
43 .driver = {
44 .name = DRV_NAME,
45 .owner = THIS_MODULE,