aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/rio/riocmd.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-04-30 03:53:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 11:29:45 -0400
commitd6f6341a6475eb7f9c2b948a7d0fd56fd16ad675 (patch)
treed43fe194f1d6d7af9ee30c78f7a763eb49fedfb7 /drivers/char/rio/riocmd.c
parentcd989b3a8c30148c872c7677c7a0415584f1658c (diff)
Char: rio, fix cirrus defines
Rename defines to be in RIO* namespace to not to collide with other defines in tree. This broke (as akpm correctly pointed out) some allmodconfig builds, e.g. on ppc: In file included from drivers/char/rio/rio_linux.c:81: drivers/char/rio/cirrus.h:202:1: warning: "COMPLETE" redefined In file included from include/net/netns/ipv4.h:8, from include/net/net_namespace.h:13, from include/linux/seq_file.h:7, from include/asm/machdep.h:12, from include/asm/pci.h:17, from include/linux/pci.h:951, from drivers/char/rio/rio_linux.c:50: include/net/inet_frag.h:28:1: warning: this is the location of the previous definition Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/rio/riocmd.c')
-rw-r--r--drivers/char/rio/riocmd.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/char/rio/riocmd.c b/drivers/char/rio/riocmd.c
index bf36959fc121..7b96e0814887 100644
--- a/drivers/char/rio/riocmd.c
+++ b/drivers/char/rio/riocmd.c
@@ -417,7 +417,7 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc
417 PortP = p->RIOPortp[SysPort]; 417 PortP = p->RIOPortp[SysPort];
418 rio_spin_lock_irqsave(&PortP->portSem, flags); 418 rio_spin_lock_irqsave(&PortP->portSem, flags);
419 switch (readb(&PktCmdP->Command)) { 419 switch (readb(&PktCmdP->Command)) {
420 case BREAK_RECEIVED: 420 case RIOC_BREAK_RECEIVED:
421 rio_dprintk(RIO_DEBUG_CMD, "Received a break!\n"); 421 rio_dprintk(RIO_DEBUG_CMD, "Received a break!\n");
422 /* If the current line disc. is not multi-threading and 422 /* If the current line disc. is not multi-threading and
423 the current processor is not the default, reset rup_intr 423 the current processor is not the default, reset rup_intr
@@ -428,16 +428,16 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc
428 gs_got_break(&PortP->gs); 428 gs_got_break(&PortP->gs);
429 break; 429 break;
430 430
431 case COMPLETE: 431 case RIOC_COMPLETE:
432 rio_dprintk(RIO_DEBUG_CMD, "Command complete on phb %d host %Zd\n", readb(&PktCmdP->PhbNum), HostP - p->RIOHosts); 432 rio_dprintk(RIO_DEBUG_CMD, "Command complete on phb %d host %Zd\n", readb(&PktCmdP->PhbNum), HostP - p->RIOHosts);
433 subCommand = 1; 433 subCommand = 1;
434 switch (readb(&PktCmdP->SubCommand)) { 434 switch (readb(&PktCmdP->SubCommand)) {
435 case MEMDUMP: 435 case RIOC_MEMDUMP:
436 rio_dprintk(RIO_DEBUG_CMD, "Memory dump cmd (0x%x) from addr 0x%x\n", readb(&PktCmdP->SubCommand), readw(&PktCmdP->SubAddr)); 436 rio_dprintk(RIO_DEBUG_CMD, "Memory dump cmd (0x%x) from addr 0x%x\n", readb(&PktCmdP->SubCommand), readw(&PktCmdP->SubAddr));
437 break; 437 break;
438 case READ_REGISTER: 438 case RIOC_READ_REGISTER:
439 rio_dprintk(RIO_DEBUG_CMD, "Read register (0x%x)\n", readw(&PktCmdP->SubAddr)); 439 rio_dprintk(RIO_DEBUG_CMD, "Read register (0x%x)\n", readw(&PktCmdP->SubAddr));
440 p->CdRegister = (readb(&PktCmdP->ModemStatus) & MSVR1_HOST); 440 p->CdRegister = (readb(&PktCmdP->ModemStatus) & RIOC_MSVR1_HOST);
441 break; 441 break;
442 default: 442 default:
443 subCommand = 0; 443 subCommand = 0;
@@ -456,14 +456,15 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc
456 rio_dprintk(RIO_DEBUG_CMD, "No change\n"); 456 rio_dprintk(RIO_DEBUG_CMD, "No change\n");
457 457
458 /* FALLTHROUGH */ 458 /* FALLTHROUGH */
459 case MODEM_STATUS: 459 case RIOC_MODEM_STATUS:
460 /* 460 /*
461 ** Knock out the tbusy and tstop bits, as these are not relevant 461 ** Knock out the tbusy and tstop bits, as these are not relevant
462 ** to the check for modem status change (they're just there because 462 ** to the check for modem status change (they're just there because
463 ** it's a convenient place to put them!). 463 ** it's a convenient place to put them!).
464 */ 464 */
465 ReportedModemStatus = readb(&PktCmdP->ModemStatus); 465 ReportedModemStatus = readb(&PktCmdP->ModemStatus);
466 if ((PortP->ModemState & MSVR1_HOST) == (ReportedModemStatus & MSVR1_HOST)) { 466 if ((PortP->ModemState & RIOC_MSVR1_HOST) ==
467 (ReportedModemStatus & RIOC_MSVR1_HOST)) {
467 rio_dprintk(RIO_DEBUG_CMD, "Modem status unchanged 0x%x\n", PortP->ModemState); 468 rio_dprintk(RIO_DEBUG_CMD, "Modem status unchanged 0x%x\n", PortP->ModemState);
468 /* 469 /*
469 ** Update ModemState just in case tbusy or tstop states have 470 ** Update ModemState just in case tbusy or tstop states have
@@ -497,7 +498,7 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc
497 /* 498 /*
498 ** Is there a carrier? 499 ** Is there a carrier?
499 */ 500 */
500 if (PortP->ModemState & MSVR1_CD) { 501 if (PortP->ModemState & RIOC_MSVR1_CD) {
501 /* 502 /*
502 ** Has carrier just appeared? 503 ** Has carrier just appeared?
503 */ 504 */
@@ -691,7 +692,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP)
691 */ 692 */
692 rio_spin_unlock_irqrestore(&UnixRupP->RupLock, flags); 693 rio_spin_unlock_irqrestore(&UnixRupP->RupLock, flags);
693 FreeMe = RIOCommandRup(p, Rup, HostP, PacketP); 694 FreeMe = RIOCommandRup(p, Rup, HostP, PacketP);
694 if (readb(&PacketP->data[5]) == MEMDUMP) { 695 if (readb(&PacketP->data[5]) == RIOC_MEMDUMP) {
695 rio_dprintk(RIO_DEBUG_CMD, "Memdump from 0x%x complete\n", readw(&(PacketP->data[6]))); 696 rio_dprintk(RIO_DEBUG_CMD, "Memdump from 0x%x complete\n", readw(&(PacketP->data[6])));
696 rio_memcpy_fromio(p->RIOMemDump, &(PacketP->data[8]), 32); 697 rio_memcpy_fromio(p->RIOMemDump, &(PacketP->data[8]), 32);
697 } 698 }