summaryrefslogtreecommitdiff
path: root/drivers/staging/dt3155/dt3155_io.h
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2010-06-22 23:38:50 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2010-06-23 22:22:36 (GMT)
commit55bb6ece160f4598a79dd484950461545f6e6638 (patch)
tree73d0b864cacf19b9eb8e796fc2bb0522b302eefd /drivers/staging/dt3155/dt3155_io.h
parent4b50fb4042a9e39cd24b411546020d6b56ff519b (diff)
downloadlinux-fsl-qoriq-55bb6ece160f4598a79dd484950461545f6e6638.tar.xz
Staging: dt3155: Cleanup memory mapped i/o access
The macros ReadMReg and WriteMReg are really just private versions of the kernel's readl and writel functions. Use the kernel's functions instead. And since ioremap returns a (void __iomem *) not a (u8 *), change all the uses of dt3155_lbase to reflect this. While here, make dt3155_lbase static since it is only used in the dt3155_drv.c file. Also, remove the global variable dt3155_bbase since it is not used anywhere in the code. Where is makes sense, create a local 'mmio' variable instead of using dt3155_lbase[minor] to make the code more readable. This change also affects the {Read|Write}I2C functions so they are also modified as needed. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Scott Smedley <ss@aao.gov.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/dt3155/dt3155_io.h')
-rw-r--r--drivers/staging/dt3155/dt3155_io.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/dt3155/dt3155_io.h b/drivers/staging/dt3155/dt3155_io.h
index d1a2510..a9aa754 100644
--- a/drivers/staging/dt3155/dt3155_io.h
+++ b/drivers/staging/dt3155/dt3155_io.h
@@ -34,11 +34,6 @@ MA 02111-1307 USA
#ifndef DT3155_IO_INC
#define DT3155_IO_INC
-/* macros to access registers */
-
-#define WriteMReg(Address, Data) (*((u32 *)(Address)) = Data)
-#define ReadMReg(Address, Data) (Data = *((u32 *)(Address)))
-
/***************** 32 bit register globals **************/
/* offsets for 32-bit memory mapped registers */
@@ -352,7 +347,7 @@ extern u8 i2c_pm_lut_data;
/* access 8-bit IIC registers */
-extern int ReadI2C(u8 *lpReg, u_short wIregIndex, u8 *byVal);
-extern int WriteI2C(u8 *lpReg, u_short wIregIndex, u8 byVal);
+extern int ReadI2C(void __iomem *mmio, u_short wIregIndex, u8 *byVal);
+extern int WriteI2C(void __iomem *mmio, u_short wIregIndex, u8 byVal);
#endif