Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7616ee95f27a04fd5a6434e9ef4a82cec4b2807c
Commit:     7616ee95f27a04fd5a6434e9ef4a82cec4b2807c
Parent:     e6f918bf39773d712ab5b457bff54ade3bda0cb1
Author:     David Vrabel <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 8 14:23:05 2007 +0100
Committer:  Pierre Ossman <[EMAIL PROTECTED]>
CommitDate: Sun Sep 23 21:16:27 2007 +0200

    sdio: add SDIO_FBR_BASE(f) macro
    
    Signed-off-by: David Vrabel <[EMAIL PROTECTED]>
    Signed-off-by: Pierre Ossman <[EMAIL PROTECTED]>
---
 drivers/mmc/core/sdio.c     |    4 ++--
 drivers/mmc/core/sdio_cis.c |    2 +-
 include/linux/mmc/sdio.h    |    2 ++
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 48c465a..58cf36e 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -30,7 +30,7 @@ static int sdio_read_fbr(struct sdio_func *func)
        unsigned char data;
 
        ret = mmc_io_rw_direct(func->card, 0, 0,
-               func->num * 0x100 + SDIO_FBR_STD_IF, 0, &data);
+               SDIO_FBR_BASE(func->num) + SDIO_FBR_STD_IF, 0, &data);
        if (ret)
                goto out;
 
@@ -38,7 +38,7 @@ static int sdio_read_fbr(struct sdio_func *func)
 
        if (data == 0x0f) {
                ret = mmc_io_rw_direct(func->card, 0, 0,
-                       func->num * 0x100 + SDIO_FBR_STD_IF_EXT, 0, &data);
+                       SDIO_FBR_BASE(func->num) + SDIO_FBR_STD_IF_EXT, 0, 
&data);
                if (ret)
                        goto out;
        }
diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c
index ec806a1..d050c40 100644
--- a/drivers/mmc/core/sdio_cis.c
+++ b/drivers/mmc/core/sdio_cis.c
@@ -145,7 +145,7 @@ static int sdio_read_cis(struct mmc_card *card, struct 
sdio_func *func)
                        fn = 0;
 
                ret = mmc_io_rw_direct(card, 0, 0,
-                                      fn * 0x100 + SDIO_FBR_CIS + i, 0, &x);
+                       SDIO_FBR_BASE(fn) + SDIO_FBR_CIS + i, 0, &x);
                if (ret)
                        return ret;
                ptr |= x << (i * 8);
diff --git a/include/linux/mmc/sdio.h b/include/linux/mmc/sdio.h
index 9b1ec76..47ba464 100644
--- a/include/linux/mmc/sdio.h
+++ b/include/linux/mmc/sdio.h
@@ -132,6 +132,8 @@
  * Function Basic Registers (FBR)
  */
 
+#define SDIO_FBR_BASE(f)       ((f) * 0x100) /* base of function f's FBRs */
+
 #define SDIO_FBR_STD_IF                0x00
 
 #define  SDIO_FBR_SUPPORTS_CSA 0x40    /* supports Code Storage Area */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to