diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-10-14 13:46:09 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-06-30 16:53:24 +0200 |
commit | 3e503822c7379ffc1a1c60aed57eb81954451faa (patch) | |
tree | 49e4f7dd370954b7920606afdd82282f6e79e698 /arch | |
parent | e71c34366808bbe3ce0b166d8710749513af6d81 (diff) | |
download | barebox-3e503822c7379ffc1a1c60aed57eb81954451faa.tar.gz barebox-3e503822c7379ffc1a1c60aed57eb81954451faa.tar.xz |
use loff_t for file offsets
This is a first step for 64bit file support: Make the file sizes/offsets
64bit.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-imx/iim.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-mxs/ocotp.c | 4 | ||||
-rw-r--r-- | arch/sandbox/board/hostfile.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/mach-imx/iim.c b/arch/arm/mach-imx/iim.c index f2ace8aa0f..0da8ea062b 100644 --- a/arch/arm/mach-imx/iim.c +++ b/arch/arm/mach-imx/iim.c @@ -84,7 +84,7 @@ static int do_fuse_sense(void __iomem *reg_base, unsigned int bank, } static ssize_t imx_iim_cdev_read(struct cdev *cdev, void *buf, size_t count, - ulong offset, ulong flags) + loff_t offset, ulong flags) { ulong size, i; struct iim_priv *priv = cdev->priv; @@ -94,7 +94,7 @@ static ssize_t imx_iim_cdev_read(struct cdev *cdev, void *buf, size_t count, if ((sense_param = dev_get_param(cdev->dev, "explicit_sense_enable"))) explicit_sense = simple_strtoul(sense_param, NULL, 0); - size = min((ulong)count, priv->banksize - offset); + size = min((loff_t)count, priv->banksize - offset); if (explicit_sense) { for (i = 0; i < size; i++) { int row_val; @@ -176,7 +176,7 @@ out: #endif /* CONFIG_IMX_IIM_FUSE_BLOW */ static ssize_t imx_iim_cdev_write(struct cdev *cdev, const void *buf, size_t count, - ulong offset, ulong flags) + loff_t offset, ulong flags) { ulong size, i; struct iim_priv *priv = cdev->priv; @@ -186,7 +186,7 @@ static ssize_t imx_iim_cdev_write(struct cdev *cdev, const void *buf, size_t cou if ((write_param = dev_get_param(cdev->dev, "permanent_write_enable"))) blow_enable = simple_strtoul(write_param, NULL, 0); - size = min((ulong)count, priv->banksize - offset); + size = min((loff_t)count, priv->banksize - offset); #ifdef CONFIG_IMX_IIM_FUSE_BLOW if (blow_enable) { for (i = 0; i < size; i++) { diff --git a/arch/arm/mach-mxs/ocotp.c b/arch/arm/mach-mxs/ocotp.c index 38f9ffde16..86e63dc7de 100644 --- a/arch/arm/mach-mxs/ocotp.c +++ b/arch/arm/mach-mxs/ocotp.c @@ -40,11 +40,11 @@ struct ocotp_priv { }; static ssize_t mxs_ocotp_cdev_read(struct cdev *cdev, void *buf, size_t count, - ulong offset, ulong flags) + loff_t offset, ulong flags) { struct ocotp_priv *priv = cdev->priv; void __iomem *base = priv->base; - size_t size = min((ulong)count, cdev->size - offset); + size_t size = min((loff_t)count, cdev->size - offset); uint64_t start; int i; diff --git a/arch/sandbox/board/hostfile.c b/arch/sandbox/board/hostfile.c index 90a97413b7..96fa100011 100644 --- a/arch/sandbox/board/hostfile.c +++ b/arch/sandbox/board/hostfile.c @@ -34,7 +34,7 @@ struct hf_priv { struct hf_platform_data *pdata; }; -static ssize_t hf_read(struct cdev *cdev, void *buf, size_t count, ulong offset, ulong flags) +static ssize_t hf_read(struct cdev *cdev, void *buf, size_t count, loff_t offset, ulong flags) { struct hf_platform_data *hf = cdev->priv; int fd = hf->fd; @@ -45,7 +45,7 @@ static ssize_t hf_read(struct cdev *cdev, void *buf, size_t count, ulong offset, return linux_read(fd, buf, count); } -static ssize_t hf_write(struct cdev *cdev, const void *buf, size_t count, ulong offset, ulong flags) +static ssize_t hf_write(struct cdev *cdev, const void *buf, size_t count, loff_t offset, ulong flags) { struct hf_platform_data *hf = cdev->priv; int fd = hf->fd; |