[ar71xx] remove duplicated includes
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1275-lis302dl-allow-unloading-module.patch.patch
1 From 399efd68e115b6548fe943a7a9fbf04753970e61 Mon Sep 17 00:00:00 2001
2 From: Simon Kagstrom <simon.kagstrom@gmail.com>
3 Date: Wed, 13 Aug 2008 11:27:11 +0100
4 Subject: [PATCH] lis302dl-allow-unloading-module.patch
5
6 This patch fixes module unloading for the accelerometer (actually module
7 loading failed before). The two problems were that the interrupt was not
8 unregistered, and that the device was left in a "strange" state.
9
10 Signed-off-by: Simon Kagstrom <simon.kagstrom@gmail.com>
11 ---
12 drivers/input/misc/lis302dl.c | 6 +++++-
13 1 files changed, 5 insertions(+), 1 deletions(-)
14
15 diff --git a/drivers/input/misc/lis302dl.c b/drivers/input/misc/lis302dl.c
16 index de8478d..b97cae7 100644
17 --- a/drivers/input/misc/lis302dl.c
18 +++ b/drivers/input/misc/lis302dl.c
19 @@ -462,11 +462,15 @@ static int __devexit lis302dl_remove(struct spi_device *spi)
20 struct lis302dl_info *lis = dev_get_drvdata(&spi->dev);
21 unsigned long flags;
22
23 - /* power down the device */
24 + /* Reset and power down the device */
25 local_save_flags(flags);
26 + reg_write(lis, LIS302DL_REG_CTRL3, 0x00);
27 + reg_write(lis, LIS302DL_REG_CTRL2, 0x00);
28 reg_write(lis, LIS302DL_REG_CTRL1, 0x00);
29 local_irq_restore(flags);
30
31 + /* Cleanup resources */
32 + free_irq(lis->spi_dev->irq, lis);
33 sysfs_remove_group(&spi->dev.kobj, &lis302dl_attr_group);
34 input_unregister_device(lis->input_dev);
35 if (lis->input_dev)
36 --
37 1.5.6.5
38
This page took 0.049157 seconds and 5 git commands to generate.