Thread (10 messages) flat view 10 messages, 4 authors, 2015-03-24
STALE4177d

[PATCH 2/5] powerpc: Remove powerpc specific byteswap from bt8xx DVB driver

From: David Gibson <hidden>
Date: 2015-02-03 05:36:13
Also in: lkml
Subsystem: media input infrastructure (v4l/dvb), the rest · Maintainers: Mauro Carvalho Chehab, Linus Torvalds

The bt8xx PCI DVB driver includes a powerpc specific hack, using one of
the powerpc specific byteswapping functions in an IO helper macro.

There's no reason to use the powerpc specific function instead of a
generic byteswap, so this patch removes it.  I'm not sure if the powerpc
specific memory barrier is required, so I'm leaving that in.

Cc: Mauro Carvalho Chehab <redacted>
Cc: Peter Hettkamp <redacted>

Signed-off-by: David Gibson <redacted>
---
 drivers/media/pci/bt8xx/bt878.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/pci/bt8xx/bt878.h b/drivers/media/pci/bt8xx/bt878.h
index d19b592..bbb76bb 100644
--- a/drivers/media/pci/bt8xx/bt878.h
+++ b/drivers/media/pci/bt8xx/bt878.h
@@ -145,12 +145,12 @@ void bt878_stop(struct bt878 *bt);
 #if defined(__powerpc__)	/* big-endian */
 static inline void io_st_le32(volatile unsigned __iomem *addr, unsigned val)
 {
-	st_le32(addr, val);
+	*addr = cpu_to_le32(val);
 	eieio();
 }
 
 #define bmtwrite(dat,adr)  io_st_le32((adr),(dat))
-#define bmtread(adr)       ld_le32((adr))
+#define bmtread(adr)       le32_to_cpu(*((volatile __le32 *)(adr)))
 #else
 #define bmtwrite(dat,adr)  writel((dat), (adr))
 #define bmtread(adr)       readl(adr)
-- 
2.1.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help