Title: [9057] trunk/drivers/input/misc/adxl34x.c: [#6151] ADXL34x accelerometer has no response in trunk
Revision
9057
Author
hennerich
Date
2010-08-05 08:49:13 -0400 (Thu, 05 Aug 2010)

Log Message

[#6151] ADXL34x accelerometer has no response in trunk
I fixed this inversed disable logic thing before 
https://patchwork.kernel.org/patch/109022/
However for some reason it is missed in mainline 
Fix disable default init and sync with mainline.

Modified Paths

Diff

Modified: trunk/drivers/input/misc/adxl34x.c (9056 => 9057)


--- trunk/drivers/input/misc/adxl34x.c	2010-08-05 12:08:07 UTC (rev 9056)
+++ trunk/drivers/input/misc/adxl34x.c	2010-08-05 12:49:13 UTC (rev 9057)
@@ -432,11 +432,10 @@
 	if (ac->suspended && !ac->disabled && ac->opened)
 		__adxl34x_enable(ac);
 
-	ac->suspended= false;
+	ac->suspended = false;
 
 	mutex_unlock(&ac->mutex);
 }
-
 EXPORT_SYMBOL_GPL(adxl34x_resume);
 
 static ssize_t adxl34x_disable_show(struct device *dev,
@@ -709,7 +708,7 @@
 	input_dev = input_allocate_device();
 	if (!ac || !input_dev) {
 		err = -ENOMEM;
-		goto err_out;
+		goto err_free_mem;
 	}
 
 	ac->fifo_delay = fifo_delay_default;
@@ -725,7 +724,7 @@
 	pdata = &ac->pdata;
 
 	ac->input = input_dev;
-	ac->disabled = true;
+	ac->disabled = false;
 	ac->dev = dev;
 	ac->irq = irq;
 	ac->bops = bops;
@@ -904,9 +903,9 @@
 	sysfs_remove_group(&ac->dev->kobj, &adxl34x_attr_group);
 	free_irq(ac->irq, ac);
 	input_unregister_device(ac->input);
+	dev_dbg(ac->dev, "unregistered accelerometer\n");
 	kfree(ac);
 
-	dev_dbg(ac->dev, "unregistered accelerometer\n");
 	return 0;
 }
 EXPORT_SYMBOL_GPL(adxl34x_remove);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to