linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] rtlwifi: Fix build failures due to raw port access
@ 2011-08-04 18:53 Larry Finger
  2011-08-04 19:03 ` Felix Fietkau
  0 siblings, 1 reply; 2+ messages in thread
From: Larry Finger @ 2011-08-04 18:53 UTC (permalink / raw)
  To: John W Linville; +Cc: linux-wireless

When rtlwifi is built for the sh4 architecture, build errors of the following
type occur. As these raw port accesses are specific to the X86 architecture,
their usage is restricted and dummy routines are substituted for all other
platforms.

    v3.0/sh4/sh-allmodconfig v3.0/sh4/sh-allyesconfig
src/drivers/net/wireless/rtlwifi/rtl8192c/../pci.h:290: error: implicit declaration of function 'outl': 4 errors in 2 logs
    v3.0/sh4/sh-allmodconfig v3.0/sh4/sh-allyesconfig
src/drivers/net/wireless/rtlwifi/rtl8192c/../pci.h:295: error: implicit declaration of function 'outb': 4 errors in 2 logs
    v3.0/sh4/sh-allmodconfig v3.0/sh4/sh-allyesconfig
src/drivers/net/wireless/rtlwifi/rtl8192c/../pci.h:300: error: implicit declaration of function 'inb': 4 errors in 2 logs
    v3.0/sh4/sh-allmodconfig v3.0/sh4/sh-allyesconfig
src/drivers/net/wireless/rtlwifi/rtl8192c/../pci.h:305: error: implicit declaration of function 'inw': 4 errors in 2 logs

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---

Index: wireless-testing-new/drivers/net/wireless/rtlwifi/pci.h
===================================================================
--- wireless-testing-new.orig/drivers/net/wireless/rtlwifi/pci.h
+++ wireless-testing-new/drivers/net/wireless/rtlwifi/pci.h
@@ -273,6 +273,7 @@ static inline void pci_write32_async(str
 	writel(val, (u8 __iomem *) rtlpriv->io.pci_mem_start + addr);
 }
 
+#ifdef CONFIG_X86
 static inline void rtl_pci_raw_write_port_ulong(u32 port, u32 val)
 {
 	outl(val, port);
@@ -288,14 +289,29 @@ static inline void rtl_pci_raw_read_port
 	*pval = inb(port);
 }
 
-static inline void rtl_pci_raw_read_port_ushort(u32 port, u16 *pval)
+static inline void rtl_pci_raw_read_port_ulong(u32 port, u32 *pval)
+{
+	*pval = inl(port);
+}
+#else
+/* define dummy routines if not X86 architecture */
+static inline void rtl_pci_raw_write_port_ulong(u32 port, u32 val)
+{
+}
+
+static inline void rtl_pci_raw_write_port_uchar(u32 port, u8 val)
 {
-	*pval = inw(port);
+}
+
+static inline void rtl_pci_raw_read_port_uchar(u32 port, u8 *pval)
+{
+	*pval = 0;
 }
 
 static inline void rtl_pci_raw_read_port_ulong(u32 port, u32 *pval)
 {
-	*pval = inl(port);
+	*pval = 0;
 }
+#endif /* ifdef CONFIG_X86 */
 
 #endif

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-04 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-04 18:53 [RFC] rtlwifi: Fix build failures due to raw port access Larry Finger
2011-08-04 19:03 ` Felix Fietkau

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).