Skip to content

Commit 9f93567

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: "A bunch of fixes for minor defects reported by Coverity, a few driver fixups and revert of i8042.nomux change so that we are once again enable active MUX mode if box claims to support it" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Revert "Input: i8042 - disable active multiplexing by default" Input: altera_ps2 - use correct type for irq return value Input: altera_ps2 - write to correct register when disabling interrupts Input: max77693-haptic - fix potential overflow Input: psmouse - remove unneeded check in psmouse_reconnect() Input: vsxxxaa - fix code dropping bytes from queue Input: ims-pcu - fix dead code in ims_pcu_ofn_reg_addr_store() Input: opencores-kbd - fix error handling Input: wm97xx - adapt parameters to tosa touchscreen. Input: i8042 - quirks for Fujitsu Lifebook A544 and Lifebook AH544 Input: stmpe-keypad - fix valid key line bitmask Input: soc_button_array - update calls to gpiod_get*()
2 parents ab01f96 + e55a336 commit 9f93567

File tree

12 files changed

+302
-29
lines changed

12 files changed

+302
-29
lines changed

Documentation/kernel-parameters.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
12641264
i8042.noloop [HW] Disable the AUX Loopback command while probing
12651265
for the AUX port
12661266
i8042.nomux [HW] Don't check presence of an active multiplexing
1267-
controller. Default: true.
1267+
controller
12681268
i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
12691269
controllers
12701270
i8042.notimeout [HW] Ignore timeout condition signalled by controller

drivers/input/keyboard/opencores-kbd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static int opencores_kbd_probe(struct platform_device *pdev)
7070

7171
opencores_kbd->addr = devm_ioremap_resource(&pdev->dev, res);
7272
if (IS_ERR(opencores_kbd->addr))
73-
error = PTR_ERR(opencores_kbd->addr);
73+
return PTR_ERR(opencores_kbd->addr);
7474

7575
input->name = pdev->name;
7676
input->phys = "opencores-kbd/input0";

drivers/input/keyboard/stmpe-keypad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static const struct stmpe_keypad_variant stmpe_keypad_variants[] = {
8686
.max_cols = 8,
8787
.max_rows = 12,
8888
.col_gpios = 0x0000ff, /* GPIO 0 - 7*/
89-
.row_gpios = 0x1fef00, /* GPIO 8-14, 16-20 */
89+
.row_gpios = 0x1f7f00, /* GPIO 8-14, 16-20 */
9090
},
9191
[STMPE2403] = {
9292
.auto_increment = true,

drivers/input/misc/ims-pcu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ static ssize_t ims_pcu_ofn_reg_addr_store(struct device *dev,
13811381
pcu->ofn_reg_addr = value;
13821382
mutex_unlock(&pcu->cmd_mutex);
13831383

1384-
return error ?: count;
1384+
return count;
13851385
}
13861386

13871387
static DEVICE_ATTR(reg_addr, S_IRUGO | S_IWUSR,

drivers/input/misc/max77693-haptic.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ static int max77693_haptic_play_effect(struct input_dev *dev, void *data,
194194
struct ff_effect *effect)
195195
{
196196
struct max77693_haptic *haptic = input_get_drvdata(dev);
197-
uint64_t period_mag_multi;
197+
u64 period_mag_multi;
198198

199199
haptic->magnitude = effect->u.rumble.strong_magnitude;
200200
if (!haptic->magnitude)
@@ -205,8 +205,7 @@ static int max77693_haptic_play_effect(struct input_dev *dev, void *data,
205205
* The formula to convert magnitude to pwm_duty as follows:
206206
* - pwm_duty = (magnitude * pwm_period) / MAX_MAGNITUDE(0xFFFF)
207207
*/
208-
period_mag_multi = (int64_t)(haptic->pwm_dev->period *
209-
haptic->magnitude);
208+
period_mag_multi = (u64)haptic->pwm_dev->period * haptic->magnitude;
210209
haptic->pwm_duty = (unsigned int)(period_mag_multi >>
211210
MAX_MAGNITUDE_SHIFT);
212211

drivers/input/misc/soc_button_array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static int soc_button_lookup_gpio(struct device *dev, int acpi_index)
5555
struct gpio_desc *desc;
5656
int gpio;
5757

58-
desc = gpiod_get_index(dev, KBUILD_MODNAME, acpi_index);
58+
desc = gpiod_get_index(dev, KBUILD_MODNAME, acpi_index, GPIOD_ASIS);
5959
if (IS_ERR(desc))
6060
return PTR_ERR(desc);
6161

drivers/input/mouse/psmouse-base.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,16 +1536,9 @@ static int psmouse_reconnect(struct serio *serio)
15361536
{
15371537
struct psmouse *psmouse = serio_get_drvdata(serio);
15381538
struct psmouse *parent = NULL;
1539-
struct serio_driver *drv = serio->drv;
15401539
unsigned char type;
15411540
int rc = -1;
15421541

1543-
if (!drv || !psmouse) {
1544-
psmouse_dbg(psmouse,
1545-
"reconnect request, but serio is disconnected, ignoring...\n");
1546-
return -1;
1547-
}
1548-
15491542
mutex_lock(&psmouse_mutex);
15501543

15511544
if (serio->parent && serio->id.type == SERIO_PS_PSTHRU) {

drivers/input/mouse/vsxxxaa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static void vsxxxaa_drop_bytes(struct vsxxxaa *mouse, int num)
128128
if (num >= mouse->count) {
129129
mouse->count = 0;
130130
} else {
131-
memmove(mouse->buf, mouse->buf + num - 1, BUFLEN - num);
131+
memmove(mouse->buf, mouse->buf + num, BUFLEN - num);
132132
mouse->count -= num;
133133
}
134134
}

drivers/input/serio/altera_ps2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static irqreturn_t altera_ps2_rxint(int irq, void *dev_id)
3737
{
3838
struct ps2if *ps2if = dev_id;
3939
unsigned int status;
40-
int handled = IRQ_NONE;
40+
irqreturn_t handled = IRQ_NONE;
4141

4242
while ((status = readl(ps2if->base)) & 0xffff0000) {
4343
serio_interrupt(ps2if->io, status & 0xff, 0);
@@ -74,7 +74,7 @@ static void altera_ps2_close(struct serio *io)
7474
{
7575
struct ps2if *ps2if = io->port_data;
7676

77-
writel(0, ps2if->base); /* disable rx irq */
77+
writel(0, ps2if->base + 4); /* disable rx irq */
7878
}
7979

8080
/*

0 commit comments

Comments
 (0)