summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-104-dio-48e.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-07-02 05:56:01 (GMT)
committerDave Airlie <airlied@redhat.com>2016-07-02 05:56:01 (GMT)
commit542d972221e024681b502033154f917c1455469f (patch)
tree1c7c1be768f6e1b496a3edad6b105804a8d05c57 /drivers/gpio/gpio-104-dio-48e.c
parent583fa4e02775b26d76771d4e1ddc6f10ba005ef2 (diff)
parent4c2e07c6a29e0129e975727b9f57eede813eea85 (diff)
downloadlinux-542d972221e024681b502033154f917c1455469f.tar.xz
Back-merge tag 'v4.7-rc5' into drm-next
Linux 4.7-rc5 The fsl-dcu pull needs -rc3 so go to -rc5 for now.
Diffstat (limited to 'drivers/gpio/gpio-104-dio-48e.c')
-rw-r--r--drivers/gpio/gpio-104-dio-48e.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-104-dio-48e.c b/drivers/gpio/gpio-104-dio-48e.c
index 1a647c0..fcf7769 100644
--- a/drivers/gpio/gpio-104-dio-48e.c
+++ b/drivers/gpio/gpio-104-dio-48e.c
@@ -75,7 +75,7 @@ static int dio48e_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
{
struct dio48e_gpio *const dio48egpio = gpiochip_get_data(chip);
const unsigned io_port = offset / 8;
- const unsigned control_port = io_port / 2;
+ const unsigned int control_port = io_port / 3;
const unsigned control_addr = dio48egpio->base + 3 + control_port*4;
unsigned long flags;
unsigned control;
@@ -115,7 +115,7 @@ static int dio48e_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
{
struct dio48e_gpio *const dio48egpio = gpiochip_get_data(chip);
const unsigned io_port = offset / 8;
- const unsigned control_port = io_port / 2;
+ const unsigned int control_port = io_port / 3;
const unsigned mask = BIT(offset % 8);
const unsigned control_addr = dio48egpio->base + 3 + control_port*4;
const unsigned out_port = (io_port > 2) ? io_port + 1 : io_port;