rpms/kernel/devel linux-2.6-wakeups-hdaps.patch, NONE, 1.1 kernel-2.6.spec, 1.3163, 1.3164
Dave Jones (davej)
fedora-extras-commits at redhat.com
Tue May 15 20:48:47 UTC 2007
Author: davej
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3330
Modified Files:
kernel-2.6.spec
Added Files:
linux-2.6-wakeups-hdaps.patch
Log Message:
* Tue May 15 2007 Dave Jones <davej at redhat.com>
- Make hdaps timer only tick when in use. (Matthew Garrett)
linux-2.6-wakeups-hdaps.patch:
--- NEW FILE linux-2.6-wakeups-hdaps.patch ---
diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c
index bf759ea..61524d2 100644
--- a/drivers/hwmon/hdaps.c
+++ b/drivers/hwmon/hdaps.c
@@ -449,6 +449,18 @@ static ssize_t hdaps_invert_store(struct device *dev,
return count;
}
+static int hdaps_mousedev_open(struct input_dev *dev)
+{
+ add_timer(&hdaps_timer);
+ return 0;
+}
+
+static int hdaps_mousedev_close(struct input_dev *dev)
+{
+ del_timer_sync(&hdaps_timer);
+ return 0;
+}
+
static DEVICE_ATTR(position, 0444, hdaps_position_show, NULL);
static DEVICE_ATTR(variance, 0444, hdaps_variance_show, NULL);
static DEVICE_ATTR(temp1, 0444, hdaps_temp1_show, NULL);
@@ -570,10 +582,17 @@ static int __init hdaps_init(void)
/* initial calibrate for the input device */
hdaps_calibrate();
+ /* start up our timer for the input device */
+ init_timer(&hdaps_timer);
+ hdaps_timer.function = hdaps_mousedev_poll;
+ hdaps_timer.expires = jiffies + HDAPS_POLL_PERIOD;
+
/* initialize the input class */
hdaps_idev->name = "hdaps";
hdaps_idev->cdev.dev = &pdev->dev;
hdaps_idev->evbit[0] = BIT(EV_ABS);
+ hdaps_idev->open = hdaps_mousedev_open;
+ hdaps_idev->close = hdaps_mousedev_close;
input_set_abs_params(hdaps_idev, ABS_X,
-256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT);
input_set_abs_params(hdaps_idev, ABS_Y,
@@ -583,12 +602,6 @@ static int __init hdaps_init(void)
if (ret)
goto out_idev;
- /* start up our timer for the input device */
- init_timer(&hdaps_timer);
- hdaps_timer.function = hdaps_mousedev_poll;
- hdaps_timer.expires = jiffies + HDAPS_POLL_PERIOD;
- add_timer(&hdaps_timer);
-
printk(KERN_INFO "hdaps: driver successfully loaded.\n");
return 0;
@@ -609,7 +622,6 @@ out:
static void __exit hdaps_exit(void)
{
- del_timer_sync(&hdaps_timer);
input_unregister_device(hdaps_idev);
sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group);
platform_device_unregister(pdev);
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3163
retrieving revision 1.3164
diff -u -r1.3163 -r1.3164
--- kernel-2.6.spec 15 May 2007 19:31:50 -0000 1.3163
+++ kernel-2.6.spec 15 May 2007 20:48:13 -0000 1.3164
@@ -616,6 +616,9 @@
Patch2500: linux-2.6-acpi-clear-fadt_cstate-control.patch
Patch2501: linux-2.6-acpi-dock-oops.patch
+# Excessive wakeups.
+Patch2600: linux-2.6-wakeups-hdaps.patch
+
# Add the new firewire stack. Diff between the v2.6.20 tag and commit
# a0ab4547b23c09541bc47a294a1397b3b0415bfe in the linux1394 git tree.
Patch5000: linux-2.6-firewire.patch
@@ -1381,6 +1384,10 @@
# Fix ACPI dock oops (#238054)
%patch2501 -p1
+# Fix excessive wakeups
+# Make hdaps timer only tick when in use.
+%patch2600 -p1
+
#
# Patches 5000 to 6000 are reserved for new drivers that are about to
# be merged upstream
@@ -2353,6 +2360,9 @@
%changelog
* Tue May 15 2007 Dave Jones <davej at redhat.com>
+- Make hdaps timer only tick when in use. (Matthew Garrett)
+
+* Tue May 15 2007 Dave Jones <davej at redhat.com>
- Add quirk for Siemens Nixdorf AG FSC Multiprocessor Interrupt Controller
* Tue May 15 2007 Dave Jones <davej at redhat.com>
More information about the fedora-extras-commits
mailing list