aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/host/tifm_sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/tifm_sd.c')
-rw-r--r--drivers/mmc/host/tifm_sd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c
index 951392d2ce3..9b904795eb7 100644
--- a/drivers/mmc/host/tifm_sd.c
+++ b/drivers/mmc/host/tifm_sd.c
@@ -16,6 +16,7 @@
#include <linux/mmc/host.h>
#include <linux/highmem.h>
#include <linux/scatterlist.h>
+#include <linux/log2.h>
#include <asm/io.h>
#define DRIVER_NAME "tifm_sd"
@@ -637,7 +638,7 @@ static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq)
goto err_out;
}
- if (mrq->data && (hweight32(mrq->data->blksz) > 1)) {
+ if (mrq->data && !is_power_of_2(mrq->data->blksz)) {
printk(KERN_ERR "%s: Unsupported block size (%d bytes)\n",
sock->dev.bus_id, mrq->data->blksz);
mrq->cmd->error = -EINVAL;