[parisc-linux-cvs] serio/input/HIL patches

Helge Deller deller at gmx.de
Wed Oct 27 14:19:16 MDT 2004


On Wednesday 27 October 2004 22:17, Helge Deller wrote:
> CVSROOT:	/var/cvs
> Module name:	linux-2.6
> Changes by:	deller	04/10/27 14:17:20
> 
> Modified files:
> 	drivers/input/keyboard: hil_kbd.c 
> 	drivers/input/misc: hp_sdc_rtc.c 
> 	drivers/input/mouse: hil_ptr.c 
> 	drivers/input/serio: gscps2.c hil_mlc.c hp_sdc.c hp_sdc_mlc.c 
> 
> Log message:
> some fixes lying on my HDD
> - remove MOD_INC/DEC_USE_COUNT,
> - some sysfs-fixes (add pointer to dev)
> - removed unneeded structs/variables
> - HIL stuff compiles now again
-------------- next part --------------
? keyboard/hpps2atkbd.h.new
Index: keyboard/hil_kbd.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/input/keyboard/hil_kbd.c,v
retrieving revision 1.10
diff -u -p -r1.10 hil_kbd.c
--- keyboard/hil_kbd.c	1 Oct 2004 20:09:01 -0000	1.10
+++ keyboard/hil_kbd.c	27 Oct 2004 20:13:41 -0000
@@ -325,6 +325,7 @@ static void hil_kbd_connect(struct serio
 	kbd->dev.id.vendor	= PCI_VENDOR_ID_HP;
 	kbd->dev.id.product	= 0x0001; /* TODO: get from kbd->rsc */
 	kbd->dev.id.version	= 0x0100; /* TODO: get from kbd->rsc */
+	kbd->dev.dev		= &serio->dev;
 
 	for (i = 0; i < 128; i++) {
 		set_bit(hil_kbd_set1[i], kbd->dev.keybit);
Index: misc/hp_sdc_rtc.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/input/misc/hp_sdc_rtc.c,v
retrieving revision 1.9
diff -u -p -r1.9 hp_sdc_rtc.c
--- misc/hp_sdc_rtc.c	18 Oct 2004 17:12:36 -0000	1.9
+++ misc/hp_sdc_rtc.c	27 Oct 2004 20:13:41 -0000
@@ -415,7 +415,6 @@ static unsigned int hp_sdc_rtc_poll(stru
 
 static int hp_sdc_rtc_open(struct inode *inode, struct file *file)
 {
-	MOD_INC_USE_COUNT;
         return 0;
 }
 
@@ -427,7 +426,6 @@ static int hp_sdc_rtc_release(struct ino
                 hp_sdc_rtc_fasync (-1, file, 0);
         }
 
-	MOD_DEC_USE_COUNT;
         return 0;
 }
 
@@ -463,35 +461,35 @@ static int hp_sdc_rtc_proc_output (char 
 	if (hp_sdc_rtc_read_rt(&tv)) {
 		p += sprintf(p, "i8042 rtc\t: READ FAILED!\n");
 	} else {
-		p += sprintf(p, "i8042 rtc\t: %d.%02d seconds\n", 
+		p += sprintf(p, "i8042 rtc\t: %ld.%02d seconds\n", 
 			     tv.tv_sec, tv.tv_usec/1000);
 	}
 
 	if (hp_sdc_rtc_read_fhs(&tv)) {
 		p += sprintf(p, "handshake\t: READ FAILED!\n");
 	} else {
-        	p += sprintf(p, "handshake\t: %d.%02d seconds\n", 
+        	p += sprintf(p, "handshake\t: %ld.%02d seconds\n", 
 			     tv.tv_sec, tv.tv_usec/1000);
 	}
 
 	if (hp_sdc_rtc_read_mt(&tv)) {
 		p += sprintf(p, "alarm\t\t: READ FAILED!\n");
 	} else {
-		p += sprintf(p, "alarm\t\t: %d.%02d seconds\n", 
+		p += sprintf(p, "alarm\t\t: %ld.%02d seconds\n", 
 			     tv.tv_sec, tv.tv_usec/1000);
 	}
 
 	if (hp_sdc_rtc_read_dt(&tv)) {
 		p += sprintf(p, "delay\t\t: READ FAILED!\n");
 	} else {
-		p += sprintf(p, "delay\t\t: %d.%02d seconds\n", 
+		p += sprintf(p, "delay\t\t: %ld.%02d seconds\n", 
 			     tv.tv_sec, tv.tv_usec/1000);
 	}
 
 	if (hp_sdc_rtc_read_ct(&tv)) {
 		p += sprintf(p, "periodic\t: READ FAILED!\n");
 	} else {
-		p += sprintf(p, "periodic\t: %d.%02d seconds\n", 
+		p += sprintf(p, "periodic\t: %ld.%02d seconds\n", 
 			     tv.tv_sec, tv.tv_usec/1000);
 	}
 
Index: mouse/hil_ptr.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/input/mouse/hil_ptr.c,v
retrieving revision 1.11
diff -u -p -r1.11 hil_ptr.c
--- mouse/hil_ptr.c	2 Oct 2004 18:52:50 -0000	1.11
+++ mouse/hil_ptr.c	27 Oct 2004 20:13:41 -0000
@@ -368,10 +368,11 @@ 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 = PCI_VENDOR_ID_HP;
-	ptr->dev.id.product = 0x0001; /* TODO: get from ptr->rsc */
-	ptr->dev.id.version = 0x0100; /* TODO: get from ptr->rsc */
+	ptr->dev.id.bustype	= BUS_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 */
+	ptr->dev.dev		= &serio->dev;
 
 	input_register_device(&ptr->dev);
 	printk(KERN_INFO "input: %s (%s), ID: %d\n",
Index: serio/gscps2.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/input/serio/gscps2.c,v
retrieving revision 1.13
diff -u -p -r1.13 gscps2.c
--- serio/gscps2.c	30 Sep 2004 12:08:10 -0000	1.13
+++ serio/gscps2.c	27 Oct 2004 20:13:42 -0000
@@ -322,19 +322,6 @@ static void gscps2_close(struct serio *p
 	gscps2_enable(ps2port, DISABLE);
 }
 
-static struct serio gscps2_serio_port =
-{
-	.name =		"GSC PS2",
-	.idbus =	BUS_GSC,
-	.idvendor =	PCI_VENDOR_ID_HP,
-	.idproduct =	0x0001,
-	.idversion =	0x0010,
-	.type =		SERIO_8042,
-	.write =	gscps2_write,
-	.open =		gscps2_open,
-	.close =	gscps2_close,
-};
-
 /**
  * gscps2_probe() - Probes PS2 devices
  * @return: success/error report
Index: serio/hil_mlc.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/input/serio/hil_mlc.c,v
retrieving revision 1.10
diff -u -p -r1.10 hil_mlc.c
--- serio/hil_mlc.c	13 Oct 2004 21:02:49 -0000	1.10
+++ serio/hil_mlc.c	27 Oct 2004 20:13:43 -0000
@@ -845,9 +845,7 @@ int hil_mlc_register(hil_mlc *mlc) {
 	int i;
         unsigned long flags;
 
-	MOD_INC_USE_COUNT;
 	if (mlc == NULL) {
-		MOD_DEC_USE_COUNT;
 		return -EINVAL;
 	}
 
@@ -919,7 +917,6 @@ int hil_mlc_unregister(hil_mlc *mlc) {
  found:
 	list_del(tmp);
         write_unlock_irqrestore(&hil_mlcs_lock, flags);
-	MOD_DEC_USE_COUNT;
 
 	for (i = 0; i < HIL_MLC_DEVMEM; i++) {
 		serio_unregister_port(mlc->serio[i]);
Index: serio/hp_sdc.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/input/serio/hp_sdc.c,v
retrieving revision 1.9
diff -u -p -r1.9 hp_sdc.c
--- serio/hp_sdc.c	11 Jul 2004 22:03:48 -0000	1.9
+++ serio/hp_sdc.c	27 Oct 2004 20:13:44 -0000
@@ -608,15 +608,12 @@ int hp_sdc_dequeue_transaction(hp_sdc_tr
 /********************** User context functions **************************/
 int hp_sdc_request_timer_irq(hp_sdc_irqhook *callback) {
 
-	MOD_INC_USE_COUNT;
 	if (callback == NULL || hp_sdc.dev == NULL) {
-		MOD_DEC_USE_COUNT;
 		return -EINVAL;
 	}
 	write_lock_irq(&hp_sdc.hook_lock);
 	if (hp_sdc.timer != NULL) {
 		write_unlock_irq(&hp_sdc.hook_lock);
-		MOD_DEC_USE_COUNT;
 		return -EBUSY;
 	}
 
@@ -635,15 +632,12 @@ int hp_sdc_request_timer_irq(hp_sdc_irqh
 
 int hp_sdc_request_hil_irq(hp_sdc_irqhook *callback) {
 
-	MOD_INC_USE_COUNT;
 	if (callback == NULL || hp_sdc.dev == NULL) {
-		MOD_DEC_USE_COUNT;
 		return -EINVAL;
 	}
 	write_lock_irq(&hp_sdc.hook_lock);
 	if (hp_sdc.hil != NULL) {
 		write_unlock_irq(&hp_sdc.hook_lock);
-		MOD_DEC_USE_COUNT;
 		return -EBUSY;
 	}
 
@@ -659,15 +653,12 @@ int hp_sdc_request_hil_irq(hp_sdc_irqhoo
 
 int hp_sdc_request_cooked_irq(hp_sdc_irqhook *callback) {
 
-	MOD_INC_USE_COUNT;
 	if (callback == NULL || hp_sdc.dev == NULL) {
-		MOD_DEC_USE_COUNT;
 		return -EINVAL;
 	}
 	write_lock_irq(&hp_sdc.hook_lock);
 	if (hp_sdc.cooked != NULL) {
 		write_unlock_irq(&hp_sdc.hook_lock);
-		MOD_DEC_USE_COUNT;
 		return -EBUSY;
 	}
 
@@ -701,7 +692,6 @@ int hp_sdc_release_timer_irq(hp_sdc_irqh
 	write_unlock_irq(&hp_sdc.hook_lock);
 	tasklet_schedule(&hp_sdc.task);
 
-	MOD_DEC_USE_COUNT;
 	return 0;
 }
 
@@ -723,7 +713,6 @@ int hp_sdc_release_hil_irq(hp_sdc_irqhoo
 	write_unlock_irq(&hp_sdc.hook_lock);
 	tasklet_schedule(&hp_sdc.task);
 
-	MOD_DEC_USE_COUNT;
 	return 0;
 }
 
@@ -745,7 +734,6 @@ int hp_sdc_release_cooked_irq(hp_sdc_irq
 	write_unlock_irq(&hp_sdc.hook_lock);
 	tasklet_schedule(&hp_sdc.task);
 
-	MOD_DEC_USE_COUNT;
 	return 0;
 }
 
Index: serio/hp_sdc_mlc.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/input/serio/hp_sdc_mlc.c,v
retrieving revision 1.7
diff -u -p -r1.7 hp_sdc_mlc.c
--- serio/hp_sdc_mlc.c	8 Sep 2003 22:00:23 -0000	1.7
+++ serio/hp_sdc_mlc.c	27 Oct 2004 20:13:44 -0000
@@ -308,11 +308,9 @@ static void hp_sdc_mlc_out (hil_mlc *mlc
 
 
 static void hp_sdc_mlc_inc_use_count (void) {
-	MOD_INC_USE_COUNT;
 }
 
 static void hp_sdc_mlc_dec_use_count (void) {
-	MOD_DEC_USE_COUNT;
 }
 
 static int __init hp_sdc_mlc_init(void)


More information about the parisc-linux-cvs mailing list