rpms/kernel/F-9 linux-2.6-hwmon-applesmc-remove-debugging-messages.patch, NONE, 1.1 kernel.spec, 1.663, 1.664

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Fri Jun 6 03:30:04 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32144

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-hwmon-applesmc-remove-debugging-messages.patch 
Log Message:
* Tue Jun 05 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25.4-45
- Kill spurious applesmc debug messages (#448056)


linux-2.6-hwmon-applesmc-remove-debugging-messages.patch:

--- NEW FILE linux-2.6-hwmon-applesmc-remove-debugging-messages.patch ---
From: https://bugzilla.redhat.com/show_bug.cgi?id=448056#c5
[cebbert: removed 'const' from parameter]

Original patch: http://mactel-linux.svn.sourceforge.net/viewvc/mactel-linux/trunk/kernel/mactel-patches-2.6.25/applesmc-remove-debugging-messages.patch?revision=156&view=markup

diff -uNrp a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
--- a/drivers/hwmon/applesmc.c	2008-04-17 09:49:44.000000000 +0700
+++ b/drivers/hwmon/applesmc.c	2008-05-22 22:49:43.000000000 +0700
@@ -130,7 +130,8 @@ struct dmi_match_data {
 	int temperature_set;
 };
 
-static const int debug;
+static int debug = 0;
+module_param(debug, int, S_IRUGO|S_IWUSR);
 static struct platform_device *pdev;
 static s16 rest_x;
 static s16 rest_y;
@@ -169,7 +170,7 @@ static int __wait_status(u8 val)
 
 	for (i = 0; i < 200; i++) {
 		if ((inb(APPLESMC_CMD_PORT) & APPLESMC_STATUS_MASK) == val) {
-			if (debug)
+			if (debug >= 9)
 				printk(KERN_DEBUG
 						"Waited %d us for status %x\n",
 						i*10, val);
@@ -178,7 +179,8 @@ static int __wait_status(u8 val)
 		udelay(10);
 	}
 
-	printk(KERN_WARNING "applesmc: wait status failed: %x != %x\n",
+	if (debug >= 1)
+		printk(KERN_WARNING "applesmc: wait status failed: %x != %x\n",
 						val, inb(APPLESMC_CMD_PORT));
 
 	return -EIO;
@@ -208,21 +210,21 @@ static int applesmc_read_key(const char*
 		if (__wait_status(0x04))
 			return -EIO;
 	}
-	if (debug)
+	if (debug >= 9)
 		printk(KERN_DEBUG "<%s", key);
 
 	outb(len, APPLESMC_DATA_PORT);
-	if (debug)
+	if (debug >= 9)
 		printk(KERN_DEBUG ">%x", len);
 
 	for (i = 0; i < len; i++) {
 		if (__wait_status(0x05))
 			return -EIO;
 		buffer[i] = inb(APPLESMC_DATA_PORT);
-		if (debug)
+		if (debug >= 9)
 			printk(KERN_DEBUG "<%x", buffer[i]);
 	}
-	if (debug)
+	if (debug >= 9)
 		printk(KERN_DEBUG "\n");
 
 	return 0;
@@ -374,7 +376,7 @@ static int applesmc_device_init(void)
 	mutex_lock(&applesmc_lock);
 
 	for (total = INIT_TIMEOUT_MSECS; total > 0; total -= INIT_WAIT_MSECS) {
-		if (debug)
+		if (debug >= 9)
 			printk(KERN_DEBUG "applesmc try %d\n", total);
 		if (!applesmc_read_key(MOTION_SENSOR_KEY, buffer, 2) &&
 				(buffer[0] != 0x00 || buffer[1] != 0x00)) {


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.663
retrieving revision 1.664
diff -u -r1.663 -r1.664
--- kernel.spec	6 Jun 2008 00:28:16 -0000	1.663
+++ kernel.spec	6 Jun 2008 03:29:21 -0000	1.664
@@ -624,6 +624,7 @@
 
 Patch450: linux-2.6-input-kill-stupid-messages.patch
 Patch451: linux-2.6-input-fix_fn_key_on_macbookpro_4_1_and_mb_air.patch
+Patch452: linux-2.6-hwmon-applesmc-remove-debugging-messages.patch
 Patch460: linux-2.6-serial-460800.patch
 Patch510: linux-2.6-silence-noise.patch
 Patch570: linux-2.6-selinux-mprotect-checks.patch
@@ -1170,6 +1171,8 @@
 ApplyPatch linux-2.6-input-kill-stupid-messages.patch
 # add support for macbook pro 4,1 and macbook air keyboards
 ApplyPatch linux-2.6-input-fix_fn_key_on_macbookpro_4_1_and_mb_air.patch
+# kill annoying applesmc debug messages
+ApplyPatch linux-2.6-hwmon-applesmc-remove-debugging-messages.patch
 
 # Allow to use 480600 baud on 16C950 UARTs
 ApplyPatch linux-2.6-serial-460800.patch
@@ -1853,6 +1856,9 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
+* Tue Jun 05 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25.4-45
+- Kill spurious applesmc debug messages (#448056)
+
 * Tue Jun 05 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25.4-44
 - Make DMA work again on atiixp PATA devices (#450191)
 




More information about the fedora-extras-commits mailing list