[parisc-linux-cvs] 2.6.0-pa8:

Helge Deller deller at gmx.de
Tue Jan 6 15:34:10 MST 2004


On Tuesday 06 January 2004 23:32, Helge Deller wrote:
> CVSROOT:	/var/cvs
> Module name:	linux-2.6
> Changes by:	deller	04/01/06 15:32:00
> 
> Modified files:
> 	.              : Makefile 
> 	drivers/input/mouse: hil_ptr.c 
> 	drivers/input/serio: hil_mlc.c hp_sdc.c 
> 	drivers/parisc : led.c 
> 
> Log message:
> 2.6.0-pa8:
> - fix new HIL drivers (do not crash any longer, HIL mouse doesn't work yet properly though)
> - simplify & clean led.c, fix echo "" > /proc/pdc/lcd

-------------- next part --------------
Index: linux-2.6/Makefile
===================================================================
RCS file: /var/cvs/linux-2.6/Makefile,v
retrieving revision 1.103
diff -u -p -r1.103 Makefile
--- linux-2.6/Makefile	29 Dec 2003 23:56:30 -0000	1.103
+++ linux-2.6/Makefile	6 Jan 2004 22:26:41 -0000
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 0
-EXTRAVERSION = -pa7
+EXTRAVERSION = -pa8
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
Index: linux-2.6/drivers/input/mouse/hil_ptr.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/input/mouse/hil_ptr.c,v
retrieving revision 1.7
diff -u -p -r1.7 hil_ptr.c
--- linux-2.6/drivers/input/mouse/hil_ptr.c	8 Sep 2003 22:00:23 -0000	1.7
+++ linux-2.6/drivers/input/mouse/hil_ptr.c	6 Jan 2004 22:26:42 -0000
@@ -38,6 +38,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
+#include <linux/pci_ids.h>
 
 #define PREFIX "HIL PTR: "
 #define HIL_GENERIC_NAME "HIL pointer device"
@@ -366,12 +367,12 @@ static void hil_ptr_connect(struct serio
 	ptr->dev.name = strlen(ptr->rnm) ? ptr->rnm : HIL_GENERIC_NAME;
 
 	ptr->dev.id.bustype = BUS_HIL;
-	ptr->dev.id.vendor = SERIO_HIL;
+	ptr->dev.id.vendor = PCI_VENDOR_ID_HP;
 	ptr->dev.id.product = 0x0001; /* TODO: get from ptr->rsc */
 	ptr->dev.id.version = 0x0100; /* TODO: get from ptr->rsc */
 
 	input_register_device(&ptr->dev);
-	printk(KERN_INFO "input: %s, %s, ID: %d\n",
+	printk(KERN_INFO "input: %s (%s), ID: %d\n",
                 ptr->dev.name, 
 		(btntype == BTN_MOUSE) ? "HIL mouse":"HIL tablet or touchpad",
 		did);
@@ -385,7 +386,7 @@ static void hil_ptr_connect(struct serio
 }
 
 
-struct serio_dev hil_ptr_serio_dev = {
+static struct serio_dev hil_ptr_serio_dev = {
 	.connect =	hil_ptr_connect,
 	.disconnect =	hil_ptr_disconnect,
 	.interrupt =	hil_ptr_interrupt
Index: linux-2.6/drivers/input/serio/hil_mlc.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/input/serio/hil_mlc.c,v
retrieving revision 1.7
diff -u -p -r1.7 hil_mlc.c
--- linux-2.6/drivers/input/serio/hil_mlc.c	8 Sep 2003 22:00:23 -0000	1.7
+++ linux-2.6/drivers/input/serio/hil_mlc.c	6 Jan 2004 22:26:43 -0000
@@ -47,7 +47,7 @@
  *	itself if output is pending.  (This rescheduling should be replaced
  *	at some point with a sub-driver-specific mechanism.)
  *
- *	A timer task prods the tasket once per second to prevent 
+ *	A timer task prods the tasklet once per second to prevent 
  *	hangups when attached devices do not return expected data
  *	and to initiate probes of the loop for new devices.
  */
Index: linux-2.6/drivers/input/serio/hp_sdc.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/input/serio/hp_sdc.c,v
retrieving revision 1.7
diff -u -p -r1.7 hp_sdc.c
--- linux-2.6/drivers/input/serio/hp_sdc.c	8 Sep 2003 22:00:23 -0000	1.7
+++ linux-2.6/drivers/input/serio/hp_sdc.c	6 Jan 2004 22:26:45 -0000
@@ -539,6 +539,7 @@ actdone:
 
 /******* Functions called in either user or kernel context ****/
 int hp_sdc_enqueue_transaction(hp_sdc_transaction *this) {
+	unsigned long flags;
 	int i;
 
 	if (this == NULL) {
@@ -546,7 +547,7 @@ int hp_sdc_enqueue_transaction(hp_sdc_tr
 		return -EINVAL;
 	};
 
-	write_lock_bh(&hp_sdc.lock);
+	write_lock_irqsave(&hp_sdc.lock, flags);
 
 	/* Can't have same transaction on queue twice */
 	for (i=0; i < HP_SDC_QUEUE_LEN; i++)
@@ -559,32 +560,33 @@ int hp_sdc_enqueue_transaction(hp_sdc_tr
 	for (i=0; i < HP_SDC_QUEUE_LEN; i++) {
 		if (hp_sdc.tq[i] == NULL) {
 			hp_sdc.tq[i] = this;
+			write_unlock_irqrestore(&hp_sdc.lock, flags);
 			tasklet_schedule(&hp_sdc.task);
-			write_unlock_bh(&hp_sdc.lock);
 			return 0;
 		}
 	}
-	write_unlock_bh(&hp_sdc.lock);
+	write_unlock_irqrestore(&hp_sdc.lock, flags);
 	printk(KERN_WARNING PREFIX "No free slot to add transaction.\n");
 	return -EBUSY;
 
  fail:
-	write_unlock_bh(&hp_sdc.lock);
+	write_unlock_irqrestore(&hp_sdc.lock,flags);
 	printk(KERN_WARNING PREFIX "Transaction add failed: transaction already queued?\n");
 	return -EINVAL;
 }
 
 int hp_sdc_dequeue_transaction(hp_sdc_transaction *this) {
+	unsigned long flags;
 	int i;
 
-	write_lock_bh(&hp_sdc.lock);
+	write_lock_irqsave(&hp_sdc.lock, flags);
 
 	/* TODO: don't remove it if it's not done. */
 
 	for (i=0; i < HP_SDC_QUEUE_LEN; i++)
 		if (hp_sdc.tq[i] == this) hp_sdc.tq[i] = NULL;
 
-	write_unlock_bh(&hp_sdc.lock);
+	write_unlock_irqrestore(&hp_sdc.lock, flags);
 	return 0;
 }
 
Index: linux-2.6/drivers/parisc/led.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/parisc/led.c,v
retrieving revision 1.6
diff -u -p -r1.6 led.c
--- linux-2.6/drivers/parisc/led.c	9 Nov 2003 18:57:46 -0000	1.6
+++ linux-2.6/drivers/parisc/led.c	6 Jan 2004 22:26:45 -0000
@@ -3,7 +3,7 @@
  *
  *      (c) Copyright 2000 Red Hat Software
  *      (c) Copyright 2000 Helge Deller <hdeller at redhat.com>
- *      (c) Copyright 2001-2003 Helge Deller <deller at gmx.de>
+ *      (c) Copyright 2001-2004 Helge Deller <deller at gmx.de>
  *      (c) Copyright 2001 Randolph Chung <tausq at debian.org>
  *
  *      This program is free software; you can redistribute it and/or modify
@@ -56,6 +56,7 @@ static int led_heartbeat = 1;
 static int led_diskio = 1;
 static int led_lanrxtx = 1;
 static char lcd_text[32];
+static char lcd_text_default[] = "Linux " UTS_RELEASE;
 
 #if 0
 #define DPRINTK(x)	printk x
@@ -196,19 +197,11 @@ static int led_proc_write(struct file *f
 
 		break;
 	case LED_HASLCD:
+		while (*cur && cur[strlen(cur)-1] == '\n')
+			cur[strlen(cur)-1] = 0;
 		if (*cur == 0) 
-		{
-			/* reset to default */
-			lcd_print("Linux " UTS_RELEASE);
-		}
-		else
-		{
-			/* chop off trailing \n.. if the user gives multiple
-			 * \n then it's all their fault.. */
-			if (*cur && cur[strlen(cur)-1] == '\n')
-				cur[strlen(cur)-1] = 0;
-			lcd_print(cur);
-		}
+			cur = lcd_text_default;
+		lcd_print(cur);
 		break;
 	default:
 		return 0;
@@ -438,11 +431,7 @@ static __inline__ int led_get_diskio_act
 #define HEARTBEAT_2ND_RANGE_START (HZ*22/100)
 #define HEARTBEAT_2ND_RANGE_END   (HEARTBEAT_2ND_RANGE_START + HEARTBEAT_LEN)
 
-#if HZ==100
- #define NORMALIZED_COUNT(count) (count)
-#else
- #define NORMALIZED_COUNT(count) (count/(HZ/100))
-#endif
+#define NORMALIZED_COUNT(count) (count/(HZ/100))
 
 static void led_tasklet_func(unsigned long unused)
 {
@@ -567,7 +556,7 @@ int __init register_led_driver(int model
 		printk(KERN_INFO "LCD display at %p,%p registered\n", 
 			LCD_CMD_REG , LCD_DATA_REG);
 		led_func_ptr = led_LCD_driver;
-		lcd_print( "Linux " UTS_RELEASE );
+		lcd_print( lcd_text_default );
 		led_type = LED_HASLCD;
 		break;
 


More information about the parisc-linux-cvs mailing list