Input: psmouse - small formatting changes to better follow coding style
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
@@ -40,8 +40,8 @@
|
||||
#include "psmouse.h"
|
||||
#include "hgpk.h"
|
||||
|
||||
static int tpdebug;
|
||||
module_param(tpdebug, int, 0644);
|
||||
static bool tpdebug;
|
||||
module_param(tpdebug, bool, 0644);
|
||||
MODULE_PARM_DESC(tpdebug, "enable debugging, dumping packets to KERN_DEBUG.");
|
||||
|
||||
static int recalib_delta = 100;
|
||||
|
@@ -250,7 +250,6 @@ static const struct ps2pp_info *get_model_info(unsigned char model)
|
||||
if (model == ps2pp_list[i].model)
|
||||
return &ps2pp_list[i];
|
||||
|
||||
printk(KERN_WARNING "logips2pp: Detected unknown logitech mouse model %d\n", model);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -285,6 +284,7 @@ static void ps2pp_set_model_properties(struct psmouse *psmouse,
|
||||
__set_bit(REL_HWHEEL, input_dev->relbit);
|
||||
|
||||
switch (model_info->kind) {
|
||||
|
||||
case PS2PP_KIND_WHEEL:
|
||||
psmouse->name = "Wheel Mouse";
|
||||
break;
|
||||
@@ -343,7 +343,8 @@ int ps2pp_init(struct psmouse *psmouse, bool set_properties)
|
||||
if (!model || !buttons)
|
||||
return -1;
|
||||
|
||||
if ((model_info = get_model_info(model)) != NULL) {
|
||||
model_info = get_model_info(model);
|
||||
if (model_info) {
|
||||
|
||||
/*
|
||||
* Do Logitech PS2++ / PS2T++ magic init.
|
||||
@@ -379,6 +380,9 @@ int ps2pp_init(struct psmouse *psmouse, bool set_properties)
|
||||
use_ps2pp = true;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
printk(KERN_WARNING "logips2pp: Detected unknown logitech mouse model %d\n", model);
|
||||
}
|
||||
|
||||
if (set_properties) {
|
||||
|
@@ -1245,7 +1245,7 @@ static int psmouse_switch_protocol(struct psmouse *psmouse,
|
||||
psmouse->pktsize = 3;
|
||||
|
||||
if (proto && (proto->detect || proto->init)) {
|
||||
if (proto->detect && proto->detect(psmouse, 1) < 0)
|
||||
if (proto->detect && proto->detect(psmouse, true) < 0)
|
||||
return -1;
|
||||
|
||||
if (proto->init && proto->init(psmouse) < 0)
|
||||
|
@@ -532,6 +532,7 @@ static int synaptics_validate_byte(unsigned char packet[], int idx, unsigned cha
|
||||
return 0;
|
||||
|
||||
switch (pkt_type) {
|
||||
|
||||
case SYN_NEWABS:
|
||||
case SYN_NEWABS_RELAXED:
|
||||
return (packet[idx] & newabs_rel_mask[idx]) == newabs_rslt[idx];
|
||||
|
Reference in New Issue
Block a user