LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@www.linux.org.uk>
To: torvalds@osdl.org
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH] ppc iomem annotations: pmac_low_i2c
Date: Mon, 25 Apr 2005 07:04:26 +0100	[thread overview]
Message-ID: <E1DPwhm-0007Ry-1D@parcelfarce.linux.theplanet.co.uk> (raw)

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
----
diff -urN RC12-rc3-ebony/arch/ppc/platforms/pmac_low_i2c.c RC12-rc3-ppc-i2c/arch/ppc/platforms/pmac_low_i2c.c
--- RC12-rc3-ebony/arch/ppc/platforms/pmac_low_i2c.c	Fri Feb  6 22:04:13 2004
+++ RC12-rc3-ppc-i2c/arch/ppc/platforms/pmac_low_i2c.c	Mon Apr 25 01:36:32 2005
@@ -54,7 +54,7 @@
 	int			mode;		/* Current mode */
 	int			channel;	/* Current channel */
 	int			num_channels;	/* Number of channels */
-	unsigned long		base;		/* For keywest-i2c, base address */
+	void __iomem *		base;		/* For keywest-i2c, base address */
 	int			bsteps;		/* And register stepping */
 	int			speed;		/* And speed */
 };
@@ -154,14 +154,12 @@
 
 static inline u8 __kw_read_reg(struct low_i2c_host *host, reg_t reg)
 {
-	return in_8(((volatile u8 *)host->base)
-		+ (((unsigned)reg) << host->bsteps));
+	return in_8(host->base + (((unsigned)reg) << host->bsteps));
 }
 
 static inline void __kw_write_reg(struct low_i2c_host *host, reg_t reg, u8 val)
 {
-	out_8(((volatile u8 *)host->base)
-		+ (((unsigned)reg) << host->bsteps), val);
+	out_8(host->base + (((unsigned)reg) << host->bsteps), val);
 	(void)__kw_read_reg(host, reg_subaddr);
 }
 
@@ -370,7 +368,7 @@
 		break;
 	}	
 	host->mode = pmac_low_i2c_mode_std;
-	host->base = (unsigned long)ioremap(np->addrs[0].address + aoffset,
+	host->base = ioremap(np->addrs[0].address + aoffset,
 						np->addrs[0].size);
 	host->func = keywest_low_i2c_func;
 }

                 reply	other threads:[~2005-04-25  6:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E1DPwhm-0007Ry-1D@parcelfarce.linux.theplanet.co.uk \
    --to=viro@www.linux.org.uk \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=torvalds@osdl.org \
    /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