Skip to content

Commit

Permalink
Input: rotary-encoder - fix bare use of 'unsigned'
Browse files Browse the repository at this point in the history
fix checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of
'unsigned''

Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Clifton Barnes authored and Dmitry Torokhov committed May 10, 2016
1 parent d144cf4 commit d96caf8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/input/misc/rotary_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ struct rotary_encoder {
bool armed;
signed char dir; /* 1 - clockwise, -1 - CCW */

unsigned last_stable;
unsigned int last_stable;
};

static unsigned rotary_encoder_get_state(struct rotary_encoder *encoder)
static unsigned int rotary_encoder_get_state(struct rotary_encoder *encoder)
{
int i;
unsigned ret = 0;
unsigned int ret = 0;

for (i = 0; i < encoder->gpios->ndescs; ++i) {
int val = gpiod_get_value_cansleep(encoder->gpios->desc[i]);
Expand Down Expand Up @@ -100,7 +100,7 @@ static void rotary_encoder_report_event(struct rotary_encoder *encoder)
static irqreturn_t rotary_encoder_irq(int irq, void *dev_id)
{
struct rotary_encoder *encoder = dev_id;
unsigned state;
unsigned int state;

mutex_lock(&encoder->access_mutex);

Expand Down

0 comments on commit d96caf8

Please sign in to comment.