mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 00:52:01 +00:00
Input: bcm5974 - silence uninitialized variables warnings
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
85927b0d52
commit
9de48cc300
@ -317,7 +317,7 @@ static int report_tp_state(struct bcm5974 *dev, int size)
|
|||||||
const struct tp_finger *f;
|
const struct tp_finger *f;
|
||||||
struct input_dev *input = dev->input;
|
struct input_dev *input = dev->input;
|
||||||
int raw_p, raw_w, raw_x, raw_y, raw_n;
|
int raw_p, raw_w, raw_x, raw_y, raw_n;
|
||||||
int ptest = 0, origin = 0, ibt = 0, nmin = 0, nmax = 0;
|
int ptest, origin, ibt = 0, nmin = 0, nmax = 0;
|
||||||
int abs_p = 0, abs_w = 0, abs_x = 0, abs_y = 0;
|
int abs_p = 0, abs_w = 0, abs_x = 0, abs_y = 0;
|
||||||
|
|
||||||
if (size < c->tp_offset || (size - c->tp_offset) % SIZEOF_FINGER != 0)
|
if (size < c->tp_offset || (size - c->tp_offset) % SIZEOF_FINGER != 0)
|
||||||
@ -345,7 +345,6 @@ static int report_tp_state(struct bcm5974 *dev, int size)
|
|||||||
/* set the integrated button if applicable */
|
/* set the integrated button if applicable */
|
||||||
if (c->tp_type == TYPE2)
|
if (c->tp_type == TYPE2)
|
||||||
ibt = raw2int(dev->tp_data[BUTTON_TYPE2]);
|
ibt = raw2int(dev->tp_data[BUTTON_TYPE2]);
|
||||||
}
|
|
||||||
|
|
||||||
/* while tracking finger still valid, count all fingers */
|
/* while tracking finger still valid, count all fingers */
|
||||||
if (ptest > PRESSURE_LOW && origin) {
|
if (ptest > PRESSURE_LOW && origin) {
|
||||||
@ -354,7 +353,8 @@ static int report_tp_state(struct bcm5974 *dev, int size)
|
|||||||
abs_x = int2bound(&c->x, raw_x - c->x.devmin);
|
abs_x = int2bound(&c->x, raw_x - c->x.devmin);
|
||||||
abs_y = int2bound(&c->y, c->y.devmax - raw_y);
|
abs_y = int2bound(&c->y, c->y.devmax - raw_y);
|
||||||
while (raw_n--) {
|
while (raw_n--) {
|
||||||
ptest = int2bound(&c->p, raw2int(f->force_major));
|
ptest = int2bound(&c->p,
|
||||||
|
raw2int(f->force_major));
|
||||||
if (ptest > PRESSURE_LOW)
|
if (ptest > PRESSURE_LOW)
|
||||||
nmax++;
|
nmax++;
|
||||||
if (ptest > PRESSURE_HIGH)
|
if (ptest > PRESSURE_HIGH)
|
||||||
@ -362,6 +362,7 @@ static int report_tp_state(struct bcm5974 *dev, int size)
|
|||||||
f++;
|
f++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (dev->fingers < nmin)
|
if (dev->fingers < nmin)
|
||||||
dev->fingers = nmin;
|
dev->fingers = nmin;
|
||||||
|
Loading…
Reference in New Issue
Block a user