summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2019-04-26 18:56:55 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-27 14:54:13 +0200
commit94001602d6bb21adbb4fa991d42b0c5d8a69db48 (patch)
treec38848c731c1cf135a7022eaa96fb2af4d2393a6 /drivers/misc
parentdrivers/misc: Add Aspeed P2A control driver (diff)
downloadlinux-94001602d6bb21adbb4fa991d42b0c5d8a69db48.tar.xz
linux-94001602d6bb21adbb4fa991d42b0c5d8a69db48.zip
misc: aspeed-p2a-ctrl: fix mixed declarations
Fix up mixed declarations and code in aspeed_p2a_mmap. Tested: Verified the build had the error and that this patch resolved it and there were no other warnings or build errors associated with compilation of this driver. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Patrick Venture <venture@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/aspeed-p2a-ctrl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/aspeed-p2a-ctrl.c b/drivers/misc/aspeed-p2a-ctrl.c
index 9736821972ef..b60fbeaffcbd 100644
--- a/drivers/misc/aspeed-p2a-ctrl.c
+++ b/drivers/misc/aspeed-p2a-ctrl.c
@@ -100,6 +100,7 @@ static void aspeed_p2a_disable_bridge(struct aspeed_p2a_ctrl *p2a_ctrl)
static int aspeed_p2a_mmap(struct file *file, struct vm_area_struct *vma)
{
unsigned long vsize;
+ pgprot_t prot;
struct aspeed_p2a_user *priv = file->private_data;
struct aspeed_p2a_ctrl *ctrl = priv->parent;
@@ -107,7 +108,7 @@ static int aspeed_p2a_mmap(struct file *file, struct vm_area_struct *vma)
return -EINVAL;
vsize = vma->vm_end - vma->vm_start;
- pgprot_t prot = vma->vm_page_prot;
+ prot = vma->vm_page_prot;
if (vma->vm_pgoff + vsize > ctrl->mem_base + ctrl->mem_size)
return -EINVAL;