@@ -49,30 +49,30 @@ struct dio48e_gpio {
4949 unsigned char out_state [6 ];
5050 unsigned char control [2 ];
5151 raw_spinlock_t lock ;
52- unsigned base ;
52+ unsigned int base ;
5353 unsigned char irq_mask ;
5454};
5555
56- static int dio48e_gpio_get_direction (struct gpio_chip * chip , unsigned offset )
56+ static int dio48e_gpio_get_direction (struct gpio_chip * chip , unsigned int offset )
5757{
5858 struct dio48e_gpio * const dio48egpio = gpiochip_get_data (chip );
59- const unsigned port = offset / 8 ;
60- const unsigned mask = BIT (offset % 8 );
59+ const unsigned int port = offset / 8 ;
60+ const unsigned int mask = BIT (offset % 8 );
6161
6262 if (dio48egpio -> io_state [port ] & mask )
6363 return GPIO_LINE_DIRECTION_IN ;
6464
6565 return GPIO_LINE_DIRECTION_OUT ;
6666}
6767
68- static int dio48e_gpio_direction_input (struct gpio_chip * chip , unsigned offset )
68+ static int dio48e_gpio_direction_input (struct gpio_chip * chip , unsigned int offset )
6969{
7070 struct dio48e_gpio * const dio48egpio = gpiochip_get_data (chip );
71- const unsigned io_port = offset / 8 ;
71+ const unsigned int io_port = offset / 8 ;
7272 const unsigned int control_port = io_port / 3 ;
73- const unsigned control_addr = dio48egpio -> base + 3 + control_port * 4 ;
73+ const unsigned int control_addr = dio48egpio -> base + 3 + control_port * 4 ;
7474 unsigned long flags ;
75- unsigned control ;
75+ unsigned int control ;
7676
7777 raw_spin_lock_irqsave (& dio48egpio -> lock , flags );
7878
@@ -104,17 +104,17 @@ static int dio48e_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
104104 return 0 ;
105105}
106106
107- static int dio48e_gpio_direction_output (struct gpio_chip * chip , unsigned offset ,
108- int value )
107+ static int dio48e_gpio_direction_output (struct gpio_chip * chip , unsigned int offset ,
108+ int value )
109109{
110110 struct dio48e_gpio * const dio48egpio = gpiochip_get_data (chip );
111- const unsigned io_port = offset / 8 ;
111+ const unsigned int io_port = offset / 8 ;
112112 const unsigned int control_port = io_port / 3 ;
113- const unsigned mask = BIT (offset % 8 );
114- const unsigned control_addr = dio48egpio -> base + 3 + control_port * 4 ;
115- const unsigned out_port = (io_port > 2 ) ? io_port + 1 : io_port ;
113+ const unsigned int mask = BIT (offset % 8 );
114+ const unsigned int control_addr = dio48egpio -> base + 3 + control_port * 4 ;
115+ const unsigned int out_port = (io_port > 2 ) ? io_port + 1 : io_port ;
116116 unsigned long flags ;
117- unsigned control ;
117+ unsigned int control ;
118118
119119 raw_spin_lock_irqsave (& dio48egpio -> lock , flags );
120120
@@ -154,14 +154,14 @@ static int dio48e_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
154154 return 0 ;
155155}
156156
157- static int dio48e_gpio_get (struct gpio_chip * chip , unsigned offset )
157+ static int dio48e_gpio_get (struct gpio_chip * chip , unsigned int offset )
158158{
159159 struct dio48e_gpio * const dio48egpio = gpiochip_get_data (chip );
160- const unsigned port = offset / 8 ;
161- const unsigned mask = BIT (offset % 8 );
162- const unsigned in_port = (port > 2 ) ? port + 1 : port ;
160+ const unsigned int port = offset / 8 ;
161+ const unsigned int mask = BIT (offset % 8 );
162+ const unsigned int in_port = (port > 2 ) ? port + 1 : port ;
163163 unsigned long flags ;
164- unsigned port_state ;
164+ unsigned int port_state ;
165165
166166 raw_spin_lock_irqsave (& dio48egpio -> lock , flags );
167167
@@ -202,12 +202,12 @@ static int dio48e_gpio_get_multiple(struct gpio_chip *chip, unsigned long *mask,
202202 return 0 ;
203203}
204204
205- static void dio48e_gpio_set (struct gpio_chip * chip , unsigned offset , int value )
205+ static void dio48e_gpio_set (struct gpio_chip * chip , unsigned int offset , int value )
206206{
207207 struct dio48e_gpio * const dio48egpio = gpiochip_get_data (chip );
208- const unsigned port = offset / 8 ;
209- const unsigned mask = BIT (offset % 8 );
210- const unsigned out_port = (port > 2 ) ? port + 1 : port ;
208+ const unsigned int port = offset / 8 ;
209+ const unsigned int mask = BIT (offset % 8 );
210+ const unsigned int out_port = (port > 2 ) ? port + 1 : port ;
211211 unsigned long flags ;
212212
213213 raw_spin_lock_irqsave (& dio48egpio -> lock , flags );
@@ -306,7 +306,7 @@ static void dio48e_irq_unmask(struct irq_data *data)
306306 raw_spin_unlock_irqrestore (& dio48egpio -> lock , flags );
307307}
308308
309- static int dio48e_irq_set_type (struct irq_data * data , unsigned flow_type )
309+ static int dio48e_irq_set_type (struct irq_data * data , unsigned int flow_type )
310310{
311311 const unsigned long offset = irqd_to_hwirq (data );
312312
0 commit comments