Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966104AbbBCFgN (ORCPT ); Tue, 3 Feb 2015 00:36:13 -0500 Received: from ozlabs.org ([103.22.144.67]:41337 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966057AbbBCFgE (ORCPT ); Tue, 3 Feb 2015 00:36:04 -0500 From: David Gibson To: benh@kernel.crashing.org, mpe@ellerman.id.au, paulus@samba.org, agraf@suse.de Cc: aik@ozlabs.ru, mdroth@us.ibm.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, David Gibson , Mauro Carvalho Chehab , Peter Hettkamp Subject: [PATCH 2/5] powerpc: Remove powerpc specific byteswap from bt8xx DVB driver Date: Tue, 3 Feb 2015 16:36:22 +1100 Message-Id: <1422941785-22557-3-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422941785-22557-1-git-send-email-david@gibson.dropbear.id.au> References: <1422941785-22557-1-git-send-email-david@gibson.dropbear.id.au> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1544 Lines: 42 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 Cc: Peter Hettkamp Signed-off-by: David Gibson --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/