|
@@ -327,7 +327,7 @@ static int s5p_set_outdata(struct s5p_aes_dev *dev, struct scatterlist *sg)
|
|
{
|
|
{
|
|
int err;
|
|
int err;
|
|
|
|
|
|
- if (!sg_dma_len(sg)) {
|
|
|
|
|
|
+ if (!sg->length) {
|
|
err = -EINVAL;
|
|
err = -EINVAL;
|
|
goto exit;
|
|
goto exit;
|
|
}
|
|
}
|
|
@@ -349,7 +349,7 @@ static int s5p_set_indata(struct s5p_aes_dev *dev, struct scatterlist *sg)
|
|
{
|
|
{
|
|
int err;
|
|
int err;
|
|
|
|
|
|
- if (!sg_dma_len(sg)) {
|
|
|
|
|
|
+ if (!sg->length) {
|
|
err = -EINVAL;
|
|
err = -EINVAL;
|
|
goto exit;
|
|
goto exit;
|
|
}
|
|
}
|
|
@@ -474,7 +474,7 @@ static void s5p_set_aes(struct s5p_aes_dev *dev,
|
|
static bool s5p_is_sg_aligned(struct scatterlist *sg)
|
|
static bool s5p_is_sg_aligned(struct scatterlist *sg)
|
|
{
|
|
{
|
|
while (sg) {
|
|
while (sg) {
|
|
- if (!IS_ALIGNED(sg_dma_len(sg), AES_BLOCK_SIZE))
|
|
|
|
|
|
+ if (!IS_ALIGNED(sg->length, AES_BLOCK_SIZE))
|
|
return false;
|
|
return false;
|
|
sg = sg_next(sg);
|
|
sg = sg_next(sg);
|
|
}
|
|
}
|