[PATCH] 2.6.0-test4 stallion serial driver cleanup

From: Peter Chubb
Date: Tue Aug 26 2003 - 22:27:20 EST



The stallion driver currently fails to compile.
The attached patch fixes it, and fixes a couple of 32/64 bit problems
in printk statements. The resulting driver appears to work on IA64
with an 8-port EasyIO board.

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1292 -> 1.1293
# drivers/char/stallion.c 1.33 -> 1.34
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/08/27 peterc@xxxxxxxxxxxxxxxxxx 1.1293
# Stallion driver cleanup: schedule_task()->schedule_work(), 64-bit cleanups.
# --------------------------------------------
#
diff -Nru a/drivers/char/stallion.c b/drivers/char/stallion.c
--- a/drivers/char/stallion.c Wed Aug 27 13:25:31 2003
+++ b/drivers/char/stallion.c Wed Aug 27 13:25:32 2003
@@ -979,7 +979,7 @@

brdp = (stlbrd_t *) stl_memalloc(sizeof(stlbrd_t));
if (brdp == (stlbrd_t *) NULL) {
- printk("STALLION: failed to allocate memory (size=%d)\n",
+ printk("STALLION: failed to allocate memory (size=%ld)\n",
sizeof(stlbrd_t));
return((stlbrd_t *) NULL);
}
@@ -2228,6 +2228,7 @@
break;
}
if (i >= stl_numintrs) {
+ /* FIXME -- pass in a valid device id */
if (request_irq(irq, stl_intr, SA_SHIRQ, name, NULL) != 0) {
printk("STALLION: failed to register interrupt "
"routine for %s irq=%d\n", name, irq);
@@ -2264,7 +2265,7 @@
portp = (stlport_t *) stl_memalloc(sizeof(stlport_t));
if (portp == (stlport_t *) NULL) {
printk("STALLION: failed to allocate memory "
- "(size=%d)\n", sizeof(stlport_t));
+ "(size=%ld)\n", sizeof(stlport_t));
break;
}
memset(portp, 0, sizeof(stlport_t));
@@ -2401,7 +2402,7 @@
panelp = (stlpanel_t *) stl_memalloc(sizeof(stlpanel_t));
if (panelp == (stlpanel_t *) NULL) {
printk(KERN_WARNING "STALLION: failed to allocate memory "
- "(size=%d)\n", sizeof(stlpanel_t));
+ "(size=%ld)\n", sizeof(stlpanel_t));
return(-ENOMEM);
}
memset(panelp, 0, sizeof(stlpanel_t));
@@ -2570,7 +2571,7 @@
panelp = (stlpanel_t *) stl_memalloc(sizeof(stlpanel_t));
if (panelp == (stlpanel_t *) NULL) {
printk("STALLION: failed to allocate memory "
- "(size=%d)\n", sizeof(stlpanel_t));
+ "(size=%ld)\n", sizeof(stlpanel_t));
break;
}
memset(panelp, 0, sizeof(stlpanel_t));
@@ -4234,7 +4235,7 @@
misr = inb(ioaddr + EREG_DATA);
if (misr & MISR_DCD) {
set_bit(ASYI_DCDCHANGE, &portp->istate);
- schedule_task(&portp->tqueue);
+ schedule_work(&portp->tqueue);
portp->stats.modem++;
}

@@ -5031,7 +5032,7 @@
if ((len == 0) || ((len < STL_TXBUFLOW) &&
(test_bit(ASYI_TXLOW, &portp->istate) == 0))) {
set_bit(ASYI_TXLOW, &portp->istate);
- schedule_task(&portp->tqueue);
+ schedule_work(&portp->tqueue);
}

if (len == 0) {
@@ -5248,7 +5249,7 @@
ipr = stl_sc26198getreg(portp, IPR);
if (ipr & IPR_DCDCHANGE) {
set_bit(ASYI_DCDCHANGE, &portp->istate);
- schedule_task(&portp->tqueue);
+ schedule_work(&portp->tqueue);
portp->stats.modem++;
}
break;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/