return sg_count;
}
-static char *sdhci_kmap_atomic(struct scatterlist *sg, unsigned long *flags)
+static char *sdhci_kmap_atomic(struct scatterlist *sg)
{
- local_irq_save(*flags);
return kmap_atomic(sg_page(sg)) + sg->offset;
}
-static void sdhci_kunmap_atomic(void *buffer, unsigned long *flags)
+static void sdhci_kunmap_atomic(void *buffer)
{
kunmap_atomic(buffer);
- local_irq_restore(*flags);
}
void sdhci_adma_write_desc(struct sdhci_host *host, void **desc,
struct mmc_data *data, int sg_count)
{
struct scatterlist *sg;
- unsigned long flags;
dma_addr_t addr, align_addr;
void *desc, *align;
char *buffer;
SDHCI_ADMA2_MASK;
if (offset) {
if (data->flags & MMC_DATA_WRITE) {
- buffer = sdhci_kmap_atomic(sg, &flags);
+ buffer = sdhci_kmap_atomic(sg);
memcpy(align, buffer, offset);
- sdhci_kunmap_atomic(buffer, &flags);
+ sdhci_kunmap_atomic(buffer);
}
/* tran, valid */
int i, size;
void *align;
char *buffer;
- unsigned long flags;
if (data->flags & MMC_DATA_READ) {
bool has_unaligned = false;
size = SDHCI_ADMA2_ALIGN -
(sg_dma_address(sg) & SDHCI_ADMA2_MASK);
- buffer = sdhci_kmap_atomic(sg, &flags);
+ buffer = sdhci_kmap_atomic(sg);
memcpy(buffer, align, size);
- sdhci_kunmap_atomic(buffer, &flags);
+ sdhci_kunmap_atomic(buffer);
align += SDHCI_ADMA2_ALIGN;
}