Skip to contentSkip to conversation

Char: remove unneded termbits redefinitions

PATCH Michael H. Warfield 3 participants 3 messages Oct 4, 2006 – Oct 7, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Michael H. Warfield

author Acked-by
#1 lore raw
Quoted 5 lines · Jiri Slaby

Char, remove unneded termbits redefinitions

No need to redefine termbits in char tree.

Quoted 105 lines

---
commit b886c49c87ee91a038b917f6933183db8ae58125
tree 222a9b1893f7d8f52ec3326bbc634296d1ab5603
parent 6545715838791f2e9f1501b5b48fae69f2d82d35
author Jiri Slaby <[email protected]> Wed, 04 Oct 2006 18:41:15 +0200 committer Jiri Slaby <[email protected]> Wed, 04 Oct 2006 18:41:15 +0200

 drivers/char/ip2/ip2ioctl.h |   35 -----------------------------------
 drivers/char/ip2/ip2main.c  |    1 -
 drivers/char/mxser.c        |    7 -------
 drivers/char/mxser_new.c    |    3 ---
 4 files changed, 0 insertions(+), 46 deletions(-)
drivers/char/ip2/ip2ioctl.h deleted +0 -35
deleted file mode 100644
index aa0a9da..0000000
@@ -1,35 +0,0 @@
-/*******************************************************************************
-*
-*   (c) 1998 by Computone Corporation
-*
-********************************************************************************
-*
-*
-*   PACKAGE:     Linux tty Device Driver for IntelliPort II family of multiport
-*                serial I/O controllers.
-*
-*   DESCRIPTION: Driver constants for configuration and tuning
-*
-*   NOTES:
-*
-*******************************************************************************/
-
-#ifndef IP2IOCTL_H
-#define IP2IOCTL_H
-
-//*************
-//* Constants *
-//*************
-
-// High baud rates (if not defined elsewhere.
-#ifndef B153600   
-#	define B153600   0010005
-#endif
-#ifndef B307200   
-#	define B307200   0010006
-#endif
-#ifndef B921600   
-#	define B921600   0010007
-#endif
-
-#endif
drivers/char/ip2/ip2main.c +0 -1
index 62ef511..30e839c 100644
@@ -123,7 +123,6 @@ #include <asm/uaccess.h>
 
 #include "ip2types.h"
 #include "ip2trace.h"
-#include "ip2ioctl.h"
 #include "ip2.h"
 #include "i2ellis.h"
 #include "i2lib.h"
drivers/char/mxser.c +0 -7
index 04bdcb6..af05faa 100644
@@ -1500,10 +1500,6 @@ static int mxser_ioctl(struct tty_struct
 	return 0;
 }
 
-#ifndef CMSPAR
-#define	CMSPAR 010000000000
-#endif
-
 static int mxser_ioctl_special(unsigned int cmd, void __user *argp)
 {
 	int i, result, status;
@@ -2554,9 +2550,6 @@ static int mxser_change_speed(struct mxs
 	if (!(info->base))
 		return ret;
 
-#ifndef B921600
-#define B921600 (B460800 +1)
-#endif
 	if (mxser_set_baud_method[info->port] == 0) {
 		baud = tty_get_baud_rate(info->tty);
 		mxser_set_baud(info, baud);
drivers/char/mxser_new.c +0 -3
index cb9c865..a555dda 100644
@@ -592,9 +592,6 @@ static int mxser_change_speed(struct mxs
 	if (!(info->ioaddr))
 		return ret;
 
-#ifndef B921600
-#define B921600 (B460800 +1)
-#endif
 	if (mxser_set_baud_method[info->tty->index] == 0) {
 		baud = tty_get_baud_rate(info->tty);
 		mxser_set_baud(info, baud);
Signature · 4 lines
Michael H. Warfield (AI4NB) | (770) 985-6132 |  [email protected]
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471        | possible worlds.  A pessimist is sure of it!
#2 lore raw
In reply to a message not in the archive
Quoted 3 lines · On Wed, 4 Oct 2006 18:49:01 +0200 (CEST) Jiri Slaby <[email protected]>…

Char, remove unneded termbits redefinitions

No need to redefine termbits in char tree.

drivers/char/ip2/ip2main.c:2498: error: 'B153600' undeclared (first use in this function) drivers/char/ip2/ip2main.c:2498: error: (Each undeclared identifier is reported only once drivers/char/ip2/ip2main.c:2498: error: for each function it appears in.) drivers/char/ip2/ip2main.c:2500: error: 'B307200' undeclared (first use in this function)

Unless you're a sparc user, methinks you didn't compile this one.

I suppose an appropriate fix would be to move the B153600 and B307200 definitions into include/asm-*/termbits.h (those which don't already have it). But that's just a guess.

#3 lore raw
Quoted 12 lines · Andrew Morton
Quoted 3 lines · On Wed, 4 Oct 2006 18:49:01 +0200 (CEST) Jiri Slaby <[email protected]>…

Char, remove unneded termbits redefinitions

No need to redefine termbits in char tree.

drivers/char/ip2/ip2main.c:2498: error: 'B153600' undeclared (first use in this function) drivers/char/ip2/ip2main.c:2498: error: (Each undeclared identifier is reported only once drivers/char/ip2/ip2main.c:2498: error: for each function it appears in.) drivers/char/ip2/ip2main.c:2500: error: 'B307200' undeclared (first use in this function)

Quoted 5 lines

Unless you're a sparc user, methinks you didn't compile this one.

I suppose an appropriate fix would be to move the B153600 and B307200 definitions into include/asm-*/termbits.h (those which don't already have it). But that's just a guess.

Hum, I thought I had at least compiled it :/. Next time I'll double-check!

The problem is, that sparc defines it in a little bit different way. ip2 does this: <<EOF
#ifndef B153600
# define B153600 0010005
#endif
#ifndef B307200
# define B307200 0010006
#endif
#ifndef B921600
# define B921600 0010007
#endif
EOF

and sparc termbits looks like this: <<EOF
/* This is what we can do with the Zilogs. */
#define B76800 0x00001005
/* This is what we can do with the SAB82532. */

#define  B153600  0x00001006
#define  B307200  0x00001007
#define  B614400  0x00001008
#define  B921600  0x00001009

EOF

This diversity should be eliminated, I guess. What do char-folks think about this? Should we move this bits into asm-specific directories?

sorry,

Signature · 4 lines
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E