]> err.no Git - linux-2.6/blobdiff - drivers/mmc/core/sdio_io.c
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
[linux-2.6] / drivers / mmc / core / sdio_io.c
old mode 100755 (executable)
new mode 100644 (file)
index 3ccf691..f61fc2d
@@ -76,11 +76,7 @@ int sdio_enable_func(struct sdio_func *func)
        if (ret)
                goto err;
 
-       /*
-        * FIXME: This should timeout based on information in the CIS,
-        * but we don't have card to parse that yet.
-        */
-       timeout = jiffies + HZ;
+       timeout = jiffies + msecs_to_jiffies(func->enable_timeout);
 
        while (1) {
                ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IORx, 0, &reg);
@@ -191,11 +187,10 @@ EXPORT_SYMBOL_GPL(sdio_set_block_size);
  */
 static inline unsigned int sdio_max_byte_size(struct sdio_func *func)
 {
-       return min(min(min(
-               func->card->host->max_seg_size,
-               func->card->host->max_blk_size),
-               func->max_blksize),
-               512u); /* maximum size for byte mode */
+       unsigned mval = min(func->card->host->max_seg_size,
+                           func->card->host->max_blk_size);
+       mval = min(mval, func->max_blksize);
+       return min(mval, 512u); /* maximum size for byte mode */
 }
 
 /**