@@ -26,10 +26,10 @@ struct sch_gpio {
26
26
unsigned short resume_base ;
27
27
};
28
28
29
- static unsigned sch_gpio_offset (struct sch_gpio * sch , unsigned gpio ,
30
- unsigned reg )
29
+ static unsigned int sch_gpio_offset (struct sch_gpio * sch , unsigned int gpio ,
30
+ unsigned int reg )
31
31
{
32
- unsigned base = 0 ;
32
+ unsigned int base = 0 ;
33
33
34
34
if (gpio >= sch -> resume_base ) {
35
35
gpio -= sch -> resume_base ;
@@ -39,14 +39,14 @@ static unsigned sch_gpio_offset(struct sch_gpio *sch, unsigned gpio,
39
39
return base + reg + gpio / 8 ;
40
40
}
41
41
42
- static unsigned sch_gpio_bit (struct sch_gpio * sch , unsigned gpio )
42
+ static unsigned int sch_gpio_bit (struct sch_gpio * sch , unsigned int gpio )
43
43
{
44
44
if (gpio >= sch -> resume_base )
45
45
gpio -= sch -> resume_base ;
46
46
return gpio % 8 ;
47
47
}
48
48
49
- static int sch_gpio_reg_get (struct sch_gpio * sch , unsigned gpio , unsigned reg )
49
+ static int sch_gpio_reg_get (struct sch_gpio * sch , unsigned int gpio , unsigned int reg )
50
50
{
51
51
unsigned short offset , bit ;
52
52
u8 reg_val ;
@@ -59,7 +59,7 @@ static int sch_gpio_reg_get(struct sch_gpio *sch, unsigned gpio, unsigned reg)
59
59
return reg_val ;
60
60
}
61
61
62
- static void sch_gpio_reg_set (struct sch_gpio * sch , unsigned gpio , unsigned reg ,
62
+ static void sch_gpio_reg_set (struct sch_gpio * sch , unsigned int gpio , unsigned int reg ,
63
63
int val )
64
64
{
65
65
unsigned short offset , bit ;
@@ -76,7 +76,7 @@ static void sch_gpio_reg_set(struct sch_gpio *sch, unsigned gpio, unsigned reg,
76
76
outb ((reg_val & ~BIT (bit )), sch -> iobase + offset );
77
77
}
78
78
79
- static int sch_gpio_direction_in (struct gpio_chip * gc , unsigned gpio_num )
79
+ static int sch_gpio_direction_in (struct gpio_chip * gc , unsigned int gpio_num )
80
80
{
81
81
struct sch_gpio * sch = gpiochip_get_data (gc );
82
82
@@ -86,13 +86,13 @@ static int sch_gpio_direction_in(struct gpio_chip *gc, unsigned gpio_num)
86
86
return 0 ;
87
87
}
88
88
89
- static int sch_gpio_get (struct gpio_chip * gc , unsigned gpio_num )
89
+ static int sch_gpio_get (struct gpio_chip * gc , unsigned int gpio_num )
90
90
{
91
91
struct sch_gpio * sch = gpiochip_get_data (gc );
92
92
return sch_gpio_reg_get (sch , gpio_num , GLV );
93
93
}
94
94
95
- static void sch_gpio_set (struct gpio_chip * gc , unsigned gpio_num , int val )
95
+ static void sch_gpio_set (struct gpio_chip * gc , unsigned int gpio_num , int val )
96
96
{
97
97
struct sch_gpio * sch = gpiochip_get_data (gc );
98
98
@@ -101,7 +101,7 @@ static void sch_gpio_set(struct gpio_chip *gc, unsigned gpio_num, int val)
101
101
spin_unlock (& sch -> lock );
102
102
}
103
103
104
- static int sch_gpio_direction_out (struct gpio_chip * gc , unsigned gpio_num ,
104
+ static int sch_gpio_direction_out (struct gpio_chip * gc , unsigned int gpio_num ,
105
105
int val )
106
106
{
107
107
struct sch_gpio * sch = gpiochip_get_data (gc );
@@ -123,7 +123,7 @@ static int sch_gpio_direction_out(struct gpio_chip *gc, unsigned gpio_num,
123
123
return 0 ;
124
124
}
125
125
126
- static int sch_gpio_get_direction (struct gpio_chip * gc , unsigned gpio_num )
126
+ static int sch_gpio_get_direction (struct gpio_chip * gc , unsigned int gpio_num )
127
127
{
128
128
struct sch_gpio * sch = gpiochip_get_data (gc );
129
129
0 commit comments