diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-10-22 15:19:53 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-22 15:19:53 -0400 |
commit | 45711f1af6eff1a6d010703b4862e0d2b9afd056 (patch) | |
tree | 3d0048f46e3df9d217d56127462ebe680348bd5a /drivers/mmc/host/tifm_sd.c | |
parent | 78c2f0b8c285c5305b3e67b0595200541e15eb43 (diff) |
[SG] Update drivers to use sg helpers
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/mmc/host/tifm_sd.c')
-rw-r--r-- | drivers/mmc/host/tifm_sd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c index 9b904795eb77..c11a3d256051 100644 --- a/drivers/mmc/host/tifm_sd.c +++ b/drivers/mmc/host/tifm_sd.c | |||
@@ -192,7 +192,7 @@ static void tifm_sd_transfer_data(struct tifm_sd *host) | |||
192 | } | 192 | } |
193 | off = sg[host->sg_pos].offset + host->block_pos; | 193 | off = sg[host->sg_pos].offset + host->block_pos; |
194 | 194 | ||
195 | pg = nth_page(sg[host->sg_pos].page, off >> PAGE_SHIFT); | 195 | pg = nth_page(sg_page(&sg[host->sg_pos]), off >> PAGE_SHIFT); |
196 | p_off = offset_in_page(off); | 196 | p_off = offset_in_page(off); |
197 | p_cnt = PAGE_SIZE - p_off; | 197 | p_cnt = PAGE_SIZE - p_off; |
198 | p_cnt = min(p_cnt, cnt); | 198 | p_cnt = min(p_cnt, cnt); |
@@ -241,18 +241,18 @@ static void tifm_sd_bounce_block(struct tifm_sd *host, struct mmc_data *r_data) | |||
241 | } | 241 | } |
242 | off = sg[host->sg_pos].offset + host->block_pos; | 242 | off = sg[host->sg_pos].offset + host->block_pos; |
243 | 243 | ||
244 | pg = nth_page(sg[host->sg_pos].page, off >> PAGE_SHIFT); | 244 | pg = nth_page(sg_page(&sg[host->sg_pos]), off >> PAGE_SHIFT); |
245 | p_off = offset_in_page(off); | 245 | p_off = offset_in_page(off); |
246 | p_cnt = PAGE_SIZE - p_off; | 246 | p_cnt = PAGE_SIZE - p_off; |
247 | p_cnt = min(p_cnt, cnt); | 247 | p_cnt = min(p_cnt, cnt); |
248 | p_cnt = min(p_cnt, t_size); | 248 | p_cnt = min(p_cnt, t_size); |
249 | 249 | ||
250 | if (r_data->flags & MMC_DATA_WRITE) | 250 | if (r_data->flags & MMC_DATA_WRITE) |
251 | tifm_sd_copy_page(host->bounce_buf.page, | 251 | tifm_sd_copy_page(sg_page(&host->bounce_buf), |
252 | r_data->blksz - t_size, | 252 | r_data->blksz - t_size, |
253 | pg, p_off, p_cnt); | 253 | pg, p_off, p_cnt); |
254 | else if (r_data->flags & MMC_DATA_READ) | 254 | else if (r_data->flags & MMC_DATA_READ) |
255 | tifm_sd_copy_page(pg, p_off, host->bounce_buf.page, | 255 | tifm_sd_copy_page(pg, p_off, sg_page(&host->bounce_buf), |
256 | r_data->blksz - t_size, p_cnt); | 256 | r_data->blksz - t_size, p_cnt); |
257 | 257 | ||
258 | t_size -= p_cnt; | 258 | t_size -= p_cnt; |