linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaro Koskinen <aaro.koskinen@iki.fi>
To: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: thomas@winischhofer.net, aaro.koskinen@iki.fi
Subject: [PATCH 6/9] sisfb: remove InPort/OutPort wrappers
Date: Fri, 19 Nov 2010 21:58:48 +0000	[thread overview]
Message-ID: <1290203931-25188-7-git-send-email-aaro.koskinen@iki.fi> (raw)
In-Reply-To: <1290203931-25188-1-git-send-email-aaro.koskinen@iki.fi>

Remove register IO wrappers.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
---
 drivers/video/sis/init.c  |   20 ++++++++++----------
 drivers/video/sis/osdef.h |   30 ------------------------------
 2 files changed, 10 insertions(+), 40 deletions(-)

diff --git a/drivers/video/sis/init.c b/drivers/video/sis/init.c
index 8351151..bfc6a1a 100644
--- a/drivers/video/sis/init.c
+++ b/drivers/video/sis/init.c
@@ -882,51 +882,51 @@ SiS_GetModeID_VGA2(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDispl
 void
 SiS_SetReg(SISIOADDRESS port, unsigned short index, unsigned short data)
 {
-   OutPortByte(port, index);
-   OutPortByte(port + 1, data);
+	outb((u8)index, port);
+	outb((u8)data, port + 1);
 }
 
 void
 SiS_SetRegByte(SISIOADDRESS port, unsigned short data)
 {
-   OutPortByte(port, data);
+	outb((u8)data, port);
 }
 
 void
 SiS_SetRegShort(SISIOADDRESS port, unsigned short data)
 {
-   OutPortWord(port, data);
+	outw((u16)data, port);
 }
 
 void
 SiS_SetRegLong(SISIOADDRESS port, unsigned int data)
 {
-   OutPortLong(port, data);
+	outl((u32)data, port);
 }
 
 unsigned char
 SiS_GetReg(SISIOADDRESS port, unsigned short index)
 {
-   OutPortByte(port, index);
-   return(InPortByte(port + 1));
+	outb((u8)index, port);
+	return inb(port + 1);
 }
 
 unsigned char
 SiS_GetRegByte(SISIOADDRESS port)
 {
-   return(InPortByte(port));
+	return inb(port);
 }
 
 unsigned short
 SiS_GetRegShort(SISIOADDRESS port)
 {
-   return(InPortWord(port));
+	return inw(port);
 }
 
 unsigned int
 SiS_GetRegLong(SISIOADDRESS port)
 {
-   return(InPortLong(port));
+	return inl(port);
 }
 
 void
diff --git a/drivers/video/sis/osdef.h b/drivers/video/sis/osdef.h
index dae407c..be7f306 100644
--- a/drivers/video/sis/osdef.h
+++ b/drivers/video/sis/osdef.h
@@ -54,30 +54,6 @@
 #ifndef _SIS_OSDEF_H_
 #define _SIS_OSDEF_H_
 
-#ifdef OutPortByte
-#undef OutPortByte
-#endif
-
-#ifdef OutPortWord
-#undef OutPortWord
-#endif
-
-#ifdef OutPortLong
-#undef OutPortLong
-#endif
-
-#ifdef InPortByte
-#undef InPortByte
-#endif
-
-#ifdef InPortWord
-#undef InPortWord
-#endif
-
-#ifdef InPortLong
-#undef InPortLong
-#endif
-
 /**********************************************************************/
 /*  LINUX KERNEL                                                      */
 /**********************************************************************/
@@ -87,12 +63,6 @@
 #warning sisfb will not work!
 #endif
 
-#define OutPortByte(p,v) outb((u8)(v),(SISIOADDRESS)(p))
-#define OutPortWord(p,v) outw((u16)(v),(SISIOADDRESS)(p))
-#define OutPortLong(p,v) outl((u32)(v),(SISIOADDRESS)(p))
-#define InPortByte(p)    inb((SISIOADDRESS)(p))
-#define InPortWord(p)    inw((SISIOADDRESS)(p))
-#define InPortLong(p)    inl((SISIOADDRESS)(p))
 #define SiS_SetMemory(MemoryAddress,MemorySize,value) memset_io(MemoryAddress, value, MemorySize)
 
 #endif  /* _OSDEF_H_ */
-- 
1.5.6.5


  parent reply	other threads:[~2010-11-19 21:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-19 21:58 [PATCH 0/9] sisfb: remove cruft code Aaro Koskinen
2010-11-19 21:58 ` [PATCH 1/9] sisfb: delete obsolete PCI ROM bug workaround Aaro Koskinen
2010-11-19 21:58 ` [PATCH 2/9] sisfb: delete fallback code for pci_map_rom() Aaro Koskinen
2010-11-19 21:58 ` [PATCH 3/9] sisfb: delete dead SIS_XORG_XF86 code Aaro Koskinen
2010-11-19 21:58 ` [PATCH 4/9] sisfb: delete redudant #define SIS_LINUX_KERNEL Aaro Koskinen
2010-11-19 21:58 ` [PATCH 5/9] sisfb: use CONFIG_FB_SIS_301/315 instead of SIS301/315H Aaro Koskinen
2010-11-19 21:58 ` Aaro Koskinen [this message]
2010-11-19 21:58 ` [PATCH 7/9] sisfb: replace SiS_SetMemory with memset_io Aaro Koskinen
2010-11-19 21:58 ` [PATCH 8/9] sisfb: move the CONFIG warning to sis_main.c Aaro Koskinen
2010-11-19 21:58 ` [PATCH 9/9] sisfb: delete osdef.h Aaro Koskinen
2010-11-24  6:26 ` [PATCH 0/9] sisfb: remove cruft code Paul Mundt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1290203931-25188-7-git-send-email-aaro.koskinen@iki.fi \
    --to=aaro.koskinen@iki.fi \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas@winischhofer.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).