spi: Get sgs size fix into branch
Dependency for patch to be applied.
This commit is contained in:
Коммит
2d2c73318b
|
@ -1000,10 +1000,10 @@ int spi_map_buf(struct spi_controller *ctlr, struct device *dev,
|
|||
int i, ret;
|
||||
|
||||
if (vmalloced_buf || kmap_buf) {
|
||||
desc_len = min_t(int, max_seg_size, PAGE_SIZE);
|
||||
desc_len = min_t(unsigned int, max_seg_size, PAGE_SIZE);
|
||||
sgs = DIV_ROUND_UP(len + offset_in_page(buf), desc_len);
|
||||
} else if (virt_addr_valid(buf)) {
|
||||
desc_len = min_t(int, max_seg_size, ctlr->max_dma_len);
|
||||
desc_len = min_t(unsigned int, max_seg_size, ctlr->max_dma_len);
|
||||
sgs = DIV_ROUND_UP(len, desc_len);
|
||||
} else {
|
||||
return -EINVAL;
|
||||
|
|
Загрузка…
Ссылка в новой задаче