Skip to content

Commit 2c58e44

Browse files
Abanoub8andy-shev
authored andcommitted
gpio: sch: changed every 'unsigned' to 'unsigned int'
Changed 'unsigned' to 'unsigned int'. This makes the code more uniform, and compliant with the kernel coding style. Signed-off-by: Abanoub Sameh <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
1 parent ae84f15 commit 2c58e44

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

drivers/gpio/gpio-sch.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ struct sch_gpio {
2626
unsigned short resume_base;
2727
};
2828

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)
3131
{
32-
unsigned base = 0;
32+
unsigned int base = 0;
3333

3434
if (gpio >= sch->resume_base) {
3535
gpio -= sch->resume_base;
@@ -39,14 +39,14 @@ static unsigned sch_gpio_offset(struct sch_gpio *sch, unsigned gpio,
3939
return base + reg + gpio / 8;
4040
}
4141

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)
4343
{
4444
if (gpio >= sch->resume_base)
4545
gpio -= sch->resume_base;
4646
return gpio % 8;
4747
}
4848

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)
5050
{
5151
unsigned short offset, bit;
5252
u8 reg_val;
@@ -59,7 +59,7 @@ static int sch_gpio_reg_get(struct sch_gpio *sch, unsigned gpio, unsigned reg)
5959
return reg_val;
6060
}
6161

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,
6363
int val)
6464
{
6565
unsigned short offset, bit;
@@ -76,7 +76,7 @@ static void sch_gpio_reg_set(struct sch_gpio *sch, unsigned gpio, unsigned reg,
7676
outb((reg_val & ~BIT(bit)), sch->iobase + offset);
7777
}
7878

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)
8080
{
8181
struct sch_gpio *sch = gpiochip_get_data(gc);
8282

@@ -86,13 +86,13 @@ static int sch_gpio_direction_in(struct gpio_chip *gc, unsigned gpio_num)
8686
return 0;
8787
}
8888

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)
9090
{
9191
struct sch_gpio *sch = gpiochip_get_data(gc);
9292
return sch_gpio_reg_get(sch, gpio_num, GLV);
9393
}
9494

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)
9696
{
9797
struct sch_gpio *sch = gpiochip_get_data(gc);
9898

@@ -101,7 +101,7 @@ static void sch_gpio_set(struct gpio_chip *gc, unsigned gpio_num, int val)
101101
spin_unlock(&sch->lock);
102102
}
103103

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,
105105
int val)
106106
{
107107
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,
123123
return 0;
124124
}
125125

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)
127127
{
128128
struct sch_gpio *sch = gpiochip_get_data(gc);
129129

0 commit comments

Comments
 (0)