diff options
author | Yann Gautier <yann.gautier@st.com> | 2019-04-16 11:35:19 +0200 |
---|---|---|
committer | Lionel Debieve <lionel.debieve@st.com> | 2020-01-10 21:14:57 +0100 |
commit | 70cb0bff7d42bd9e09dddef3c2fc6e3b385c6e5a (patch) | |
tree | efbc6f4022b452814b15ef9f4d4762387a2d7e88 /drivers/st/io/io_mmc.c | |
parent | 8c80c86573898eb59127a32b089e753f40e254fb (diff) | |
download | trusted-firmware-a-70cb0bff7d42bd9e09dddef3c2fc6e3b385c6e5a.tar.gz |
io: change seek offset to signed long long
IO seek offset can be set to values above UINT32_MAX, this change
changes the seek offset argument from 'ssize_t' to 'signed long long'.
Fixing platform seek functions to match the new interface update.
Change-Id: I25de83b3b7abe5f52a7b0fee36f71e60cac9cfcb
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Diffstat (limited to 'drivers/st/io/io_mmc.c')
-rw-r--r-- | drivers/st/io/io_mmc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/st/io/io_mmc.c b/drivers/st/io/io_mmc.c index a239b5f3ad..44b7d19074 100644 --- a/drivers/st/io/io_mmc.c +++ b/drivers/st/io/io_mmc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -20,14 +20,15 @@ static int mmc_dev_open(const uintptr_t init_params, io_dev_info_t **dev_info); static int mmc_block_open(io_dev_info_t *dev_info, const uintptr_t spec, io_entity_t *entity); static int mmc_dev_init(io_dev_info_t *dev_info, const uintptr_t init_params); -static int mmc_block_seek(io_entity_t *entity, int mode, ssize_t offset); +static int mmc_block_seek(io_entity_t *entity, int mode, + signed long long offset); static int mmc_block_read(io_entity_t *entity, uintptr_t buffer, size_t length, size_t *length_read); static int mmc_block_close(io_entity_t *entity); static int mmc_dev_close(io_dev_info_t *dev_info); static io_type_t device_type_mmc(void); -static ssize_t seek_offset; +static signed long long seek_offset; static const io_dev_connector_t mmc_dev_connector = { .dev_open = mmc_dev_open @@ -85,7 +86,8 @@ static int mmc_block_open(io_dev_info_t *dev_info, const uintptr_t spec, } /* Seek to a particular file offset on the mmc device */ -static int mmc_block_seek(io_entity_t *entity, int mode, ssize_t offset) +static int mmc_block_seek(io_entity_t *entity, int mode, + signed long long offset) { seek_offset = offset; return 0; |