projects/linux·commit a12deb44

Merge tag 'input-for-v6.7-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

a12deb44 · Linus Torvalds <[email protected]> · 2023-11-09 14:18:42 -08:00

Pull input updates from Dmitry Torokhov:

 - a number of input drivers has been converted to use facilities
   provided by the device core to instantiate driver-specific attributes
   instead of using devm_device_add_group() and similar APIs

 - platform input devices have been converted to use remove() callback
   returning void

 - a fix for use-after-free when tearing down a Synaptics RMI device

 - a few flexible arrays in input structures have been annotated with
   __counted_by to help hardening efforts

 - handling of vddio supply in cyttsp5 driver

 - other miscellaneous fixups

* tag 'input-for-v6.7-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (86 commits)
  Input: walkera0701 - use module_parport_driver macro to simplify the code
  Input: synaptics-rmi4 - fix use after free in rmi_unregister_function()
  dt-bindings: input: fsl,scu-key: Document wakeup-source
  Input: cyttsp5 - add handling for vddio regulator
  dt-bindings: input: cyttsp5: document vddio-supply
  Input: tegra-kbc - use device_get_match_data()
  Input: Annotate struct ff_device with __counted_by
  Input: axp20x-pek - avoid needless newline removal
  Input: mt - annotate struct input_mt with __counted_by
  Input: leds - annotate struct input_leds with __counted_by
  Input: evdev - annotate struct evdev_client with __counted_by
  Input: synaptics-rmi4 - replace deprecated strncpy
  Input: wm97xx-core - convert to platform remove callback returning void
  Input: wm831x-ts - convert to platform remove callback returning void
  Input: ti_am335x_tsc - convert to platform remove callback returning void
  Input: sun4i-ts - convert to platform remove callback returning void
  Input: stmpe-ts - convert to platform remove callback returning void
  Input: pcap_ts - convert to platform remove callback returning void
  Input: mc13783_ts - convert to platform remove callback returning void
  Input: mainstone-wm97xx - convert to platform remove callback returning void
  ...
Commit
a12deb44f9734dc25970c266249b272e44d3d1b5
Parents
ace92fd9 · cdd5b5a9

Merge commit. Changes below are compared with the first parent: ace92fd9.

Changes

91 files changed · +240 −471

FileStatusAddDelContent
Documentation/devicetree/bindings/input/fsl,scu-key.yamlmodified+2−0View file
Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yamlmodified+3−0View file
drivers/input/evdev.cmodified+1−1View file
drivers/input/input-leds.cmodified+1−1View file
drivers/input/joystick/walkera0701.cmodified+1−12View file
drivers/input/keyboard/adp5520-keys.cmodified+2−4View file
drivers/input/keyboard/cros_ec_keyb.cmodified+5−11View file
drivers/input/keyboard/ep93xx_keypad.cmodified+2−4View file
drivers/input/keyboard/iqs62x-keys.cmodified+2−4View file
drivers/input/keyboard/matrix_keypad.cmodified+2−4View file
drivers/input/keyboard/omap-keypad.cmodified+2−4View file
drivers/input/keyboard/omap4-keypad.cmodified+2−4View file
drivers/input/keyboard/samsung-keypad.cmodified+2−4View file
drivers/input/keyboard/sh_keysc.cmodified+2−4View file
drivers/input/keyboard/spear-keyboard.cmodified+2−4View file
drivers/input/keyboard/stmpe-keypad.cmodified+2−4View file
drivers/input/keyboard/tegra-kbc.cmodified+2−5View file
drivers/input/misc/88pm80x_onkey.cmodified+2−3View file
drivers/input/misc/axp20x-pek.cmodified+1−10View file
drivers/input/misc/da9052_onkey.cmodified+2−4View file
drivers/input/misc/da9055_onkey.cmodified+2−4View file
drivers/input/misc/ideapad_slidebar.cmodified+2−4View file
drivers/input/misc/iqs269a.cmodified+2−8View file
drivers/input/misc/kxtj9.cmodified+17−12View file
drivers/input/misc/m68kspkr.cmodified+2−4View file
drivers/input/misc/max8997_haptic.cmodified+2−4View file
drivers/input/misc/mc13783-pwrbutton.cmodified+2−4View file
drivers/input/misc/palmas-pwrbutton.cmodified+2−4View file
drivers/input/misc/pcap_keys.cmodified+2−4View file
drivers/input/misc/pcf50633-input.cmodified+2−4View file
drivers/input/misc/pcspkr.cmodified+2−4View file
drivers/input/misc/pm8941-pwrkey.cmodified+2−4View file
drivers/input/misc/soc_button_array.cmodified+2−4View file
drivers/input/misc/sparcspkr.cmodified+4−8View file
drivers/input/misc/wistron_btns.cmodified+2−4View file
drivers/input/misc/wm831x-on.cmodified+2−4View file
drivers/input/mouse/cyapa.cmodified+3−11View file
drivers/input/mouse/navpoint.cmodified+2−4View file
drivers/input/rmi4/rmi_bus.cmodified+1−1View file
drivers/input/rmi4/rmi_f34.cmodified+1−1View file
drivers/input/serio/altera_ps2.cmodified+2−4View file
drivers/input/serio/ams_delta_serio.cmodified+2−4View file
drivers/input/serio/apbps2.cmodified+2−4View file
drivers/input/serio/arc_ps2.cmodified+2−4View file
drivers/input/serio/ct82c710.cmodified+2−4View file
drivers/input/serio/i8042-sparcio.hmodified+2−4View file
drivers/input/serio/i8042.cmodified+2−4View file
drivers/input/serio/ioc3kbd.cmodified+2−4View file
drivers/input/serio/maceps2.cmodified+2−4View file
drivers/input/serio/olpc_apsp.cmodified+2−4View file
drivers/input/serio/ps2-gpio.cmodified+2−3View file
drivers/input/serio/q40kbd.cmodified+2−4View file
drivers/input/serio/rpckbd.cmodified+2−4View file
drivers/input/serio/sun4i-ps2.cmodified+2−4View file
drivers/input/serio/xilinx_ps2.cmodified+2−4View file
drivers/input/touchscreen/ad7877.cmodified+5−7View file
drivers/input/touchscreen/ad7879-i2c.cmodified+4−3View file
drivers/input/touchscreen/ad7879-spi.cmodified+4−3View file
drivers/input/touchscreen/ad7879.cmodified+6−4View file
drivers/input/touchscreen/ad7879.hmodified+3−0View file
drivers/input/touchscreen/ads7846.cmodified+6−12View file
drivers/input/touchscreen/cyttsp5.cmodified+12−7View file
drivers/input/touchscreen/da9052_tsi.cmodified+2−4View file
drivers/input/touchscreen/edt-ft5x06.cmodified+2−8View file
drivers/input/touchscreen/elants_i2c.cmodified+3−12View file
drivers/input/touchscreen/exc3000.cmodified+3−9View file
drivers/input/touchscreen/hideep.cmodified+3−12View file
drivers/input/touchscreen/hycon-hy46xx.cmodified+2−8View file
drivers/input/touchscreen/ili210x.cmodified+5−10View file
drivers/input/touchscreen/ilitek_ts_i2c.cmodified+2−10View file
drivers/input/touchscreen/iqs5xx.cmodified+3−7View file
drivers/input/touchscreen/mainstone-wm97xx.cmodified+2−4View file
drivers/input/touchscreen/mc13783_ts.cmodified+2−4View file
drivers/input/touchscreen/melfas_mip4.cmodified+2−11View file
drivers/input/touchscreen/pcap_ts.cmodified+2−4View file
drivers/input/touchscreen/raydium_i2c_ts.cmodified+3−13View file
drivers/input/touchscreen/rohm_bu21023.cmodified+2−10View file
drivers/input/touchscreen/s6sy761.cmodified+2−8View file
drivers/input/touchscreen/stmfts.cmodified+2−8View file
drivers/input/touchscreen/stmpe-ts.cmodified+2−4View file
drivers/input/touchscreen/sun4i-ts.cmodified+2−4View file
drivers/input/touchscreen/ti_am335x_tsc.cmodified+2−3View file
drivers/input/touchscreen/tsc2004.cmodified+4−3View file
drivers/input/touchscreen/tsc2005.cmodified+4−3View file
drivers/input/touchscreen/tsc200x-core.cmodified+7−11View file
drivers/input/touchscreen/tsc200x-core.hmodified+1−0View file
drivers/input/touchscreen/wdt87xx_i2c.cmodified+4−12View file
drivers/input/touchscreen/wm831x-ts.cmodified+2−4View file
drivers/input/touchscreen/wm97xx-core.cmodified+2−4View file
include/linux/input.hmodified+1−1View file
include/linux/input/mt.hmodified+1−1View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/input/fsl,scu-key.yaml

View file
diff --git a/Documentation/devicetree/bindings/input/fsl,scu-key.yaml b/Documentation/devicetree/bindings/input/fsl,scu-key.yaml
index e5a3c35..29921aa 100644
--- a/Documentation/devicetree/bindings/input/fsl,scu-key.yaml
+++ b/Documentation/devicetree/bindings/input/fsl,scu-key.yaml
@@ -24,6 +24,8 @@ properties:
linux,keycodes:
maxItems: 1
+ wakeup-source: true
+
required:
- compatible
- linux,keycodes

Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml

View file
diff --git a/Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml b/Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml
index 4080422..037e5d3 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml
@@ -34,6 +34,9 @@ properties:
vdd-supply:
description: Regulator for voltage.
+ vddio-supply:
+ description: Optional Regulator for I/O voltage.
+
reset-gpios:
maxItems: 1

drivers/input/evdev.c

View file
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 95f9069..51e0c49 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -50,7 +50,7 @@ struct evdev_client {
bool revoked;
unsigned long *evmasks[EV_CNT];
unsigned int bufsize;
- struct input_event buffer[];
+ struct input_event buffer[] __counted_by(bufsize);
};
static size_t evdev_get_mask_cnt(unsigned int type)

drivers/input/input-leds.c

View file
diff --git a/drivers/input/input-leds.c b/drivers/input/input-leds.c
index 0b11990..0e93591 100644
--- a/drivers/input/input-leds.c
+++ b/drivers/input/input-leds.c
@@ -44,7 +44,7 @@ struct input_led {
struct input_leds {
struct input_handle handle;
unsigned int num_leds;
- struct input_led leds[];
+ struct input_led leds[] __counted_by(num_leds);
};
static enum led_brightness input_leds_brightness_get(struct led_classdev *cdev)

drivers/input/joystick/walkera0701.c

View file
diff --git a/drivers/input/joystick/walkera0701.c b/drivers/input/joystick/walkera0701.c
index 56abc8c..27d95d6 100644
--- a/drivers/input/joystick/walkera0701.c
+++ b/drivers/input/joystick/walkera0701.c
@@ -296,15 +296,4 @@ static struct parport_driver walkera0701_parport_driver = {
.devmodel = true,
};
-static int __init walkera0701_init(void)
-{
- return parport_register_driver(&walkera0701_parport_driver);
-}
-
-static void __exit walkera0701_exit(void)
-{
- parport_unregister_driver(&walkera0701_parport_driver);
-}
-
-module_init(walkera0701_init);
-module_exit(walkera0701_exit);
+module_parport_driver(walkera0701_parport_driver);

drivers/input/keyboard/adp5520-keys.c

View file
diff --git a/drivers/input/keyboard/adp5520-keys.c b/drivers/input/keyboard/adp5520-keys.c
index 7851ffd..10c248f 100644
--- a/drivers/input/keyboard/adp5520-keys.c
+++ b/drivers/input/keyboard/adp5520-keys.c
@@ -168,14 +168,12 @@ static int adp5520_keys_probe(struct platform_device *pdev)
return 0;
}
-static int adp5520_keys_remove(struct platform_device *pdev)
+static void adp5520_keys_remove(struct platform_device *pdev)
{
struct adp5520_keys *dev = platform_get_drvdata(pdev);
adp5520_unregister_notifier(dev->master, &dev->notifier,
ADP5520_KP_IEN | ADP5520_KR_IEN);
-
- return 0;
}
static struct platform_driver adp5520_keys_driver = {
@@ -183,7 +181,7 @@ static struct platform_driver adp5520_keys_driver = {
.name = "adp5520-keys",
},
.probe = adp5520_keys_probe,
- .remove = adp5520_keys_remove,
+ .remove_new = adp5520_keys_remove,
};
module_platform_driver(adp5520_keys_driver);

drivers/input/keyboard/cros_ec_keyb.c

View file
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index e7ecfca..30678a3 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -686,10 +686,11 @@ static umode_t cros_ec_keyb_attr_is_visible(struct kobject *kobj,
return attr->mode;
}
-static const struct attribute_group cros_ec_keyb_attr_group = {
+static const struct attribute_group cros_ec_keyb_group = {
.is_visible = cros_ec_keyb_attr_is_visible,
.attrs = cros_ec_keyb_attrs,
};
+__ATTRIBUTE_GROUPS(cros_ec_keyb);
static int cros_ec_keyb_probe(struct platform_device *pdev)
{
@@ -730,12 +731,6 @@ static int cros_ec_keyb_probe(struct platform_device *pdev)
return err;
}
- err = devm_device_add_group(dev, &cros_ec_keyb_attr_group);
- if (err) {
- dev_err(dev, "failed to create attributes: %d\n", err);
- return err;
- }
-
ckdev->notifier.notifier_call = cros_ec_keyb_work;
err = blocking_notifier_chain_register(&ckdev->ec->event_notifier,
&ckdev->notifier);
@@ -748,14 +743,12 @@ static int cros_ec_keyb_probe(struct platform_device *pdev)
return 0;
}
-static int cros_ec_keyb_remove(struct platform_device *pdev)
+static void cros_ec_keyb_remove(struct platform_device *pdev)
{
struct cros_ec_keyb *ckdev = dev_get_drvdata(&pdev->dev);
blocking_notifier_chain_unregister(&ckdev->ec->event_notifier,
&ckdev->notifier);
-
- return 0;
}
#ifdef CONFIG_ACPI
@@ -779,9 +772,10 @@ static DEFINE_SIMPLE_DEV_PM_OPS(cros_ec_keyb_pm_ops, NULL, cros_ec_keyb_resume);
static struct platform_driver cros_ec_keyb_driver = {
.probe = cros_ec_keyb_probe,
- .remove = cros_ec_keyb_remove,
+ .remove_new = cros_ec_keyb_remove,
.driver = {
.name = "cros-ec-keyb",
+ .dev_groups = cros_ec_keyb_groups,
.of_match_table = of_match_ptr(cros_ec_keyb_of_match),
.acpi_match_table = ACPI_PTR(cros_ec_keyb_acpi_match),
.pm = pm_sleep_ptr(&cros_ec_keyb_pm_ops),

drivers/input/keyboard/ep93xx_keypad.c

View file
diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c
index 55075ad..6b811d6 100644
--- a/drivers/input/keyboard/ep93xx_keypad.c
+++ b/drivers/input/keyboard/ep93xx_keypad.c
@@ -308,11 +308,9 @@ static int ep93xx_keypad_probe(struct platform_device *pdev)
return 0;
}
-static int ep93xx_keypad_remove(struct platform_device *pdev)
+static void ep93xx_keypad_remove(struct platform_device *pdev)
{
dev_pm_clear_wake_irq(&pdev->dev);
-
- return 0;
}
static struct platform_driver ep93xx_keypad_driver = {
@@ -321,7 +319,7 @@ static struct platform_driver ep93xx_keypad_driver = {
.pm = pm_sleep_ptr(&ep93xx_keypad_pm_ops),
},
.probe = ep93xx_keypad_probe,
- .remove = ep93xx_keypad_remove,
+ .remove_new = ep93xx_keypad_remove,
};
module_platform_driver(ep93xx_keypad_driver);

drivers/input/keyboard/iqs62x-keys.c

View file
diff --git a/drivers/input/keyboard/iqs62x-keys.c b/drivers/input/keyboard/iqs62x-keys.c
index 02ceeba..688d612 100644
--- a/drivers/input/keyboard/iqs62x-keys.c
+++ b/drivers/input/keyboard/iqs62x-keys.c
@@ -310,7 +310,7 @@ static int iqs62x_keys_probe(struct platform_device *pdev)
return ret;
}
-static int iqs62x_keys_remove(struct platform_device *pdev)
+static void iqs62x_keys_remove(struct platform_device *pdev)
{
struct iqs62x_keys_private *iqs62x_keys = platform_get_drvdata(pdev);
int ret;
@@ -319,8 +319,6 @@ static int iqs62x_keys_remove(struct platform_device *pdev)
&iqs62x_keys->notifier);
if (ret)
dev_err(&pdev->dev, "Failed to unregister notifier: %d\n", ret);
-
- return 0;
}
static struct platform_driver iqs62x_keys_platform_driver = {
@@ -328,7 +326,7 @@ static struct platform_driver iqs62x_keys_platform_driver = {
.name = "iqs62x-keys",
},
.probe = iqs62x_keys_probe,
- .remove = iqs62x_keys_remove,
+ .remove_new = iqs62x_keys_remove,
};
module_platform_driver(iqs62x_keys_platform_driver);

drivers/input/keyboard/matrix_keypad.c

View file
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c
index a1b0378..50fa764 100644
--- a/drivers/input/keyboard/matrix_keypad.c
+++ b/drivers/input/keyboard/matrix_keypad.c
@@ -549,15 +549,13 @@ err_free_mem:
return err;
}
-static int matrix_keypad_remove(struct platform_device *pdev)
+static void matrix_keypad_remove(struct platform_device *pdev)
{
struct matrix_keypad *keypad = platform_get_drvdata(pdev);
matrix_keypad_free_gpio(keypad);
input_unregister_device(keypad->input_dev);
kfree(keypad);
-
- return 0;
}
#ifdef CONFIG_OF
@@ -570,7 +568,7 @@ MODULE_DEVICE_TABLE(of, matrix_keypad_dt_match);
static struct platform_driver matrix_keypad_driver = {
.probe = matrix_keypad_probe,
- .remove = matrix_keypad_remove,
+ .remove_new = matrix_keypad_remove,
.driver = {
.name = "matrix-keypad",
.pm = pm_sleep_ptr(&matrix_keypad_pm_ops),

drivers/input/keyboard/omap-keypad.c

View file
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c
index 24440b4..454fb86 100644
--- a/drivers/input/keyboard/omap-keypad.c
+++ b/drivers/input/keyboard/omap-keypad.c
@@ -287,7 +287,7 @@ err2:
return -EINVAL;
}
-static int omap_kp_remove(struct platform_device *pdev)
+static void omap_kp_remove(struct platform_device *pdev)
{
struct omap_kp *omap_kp = platform_get_drvdata(pdev);
@@ -303,13 +303,11 @@ static int omap_kp_remove(struct platform_device *pdev)
input_unregister_device(omap_kp->input);
kfree(omap_kp);
-
- return 0;
}
static struct platform_driver omap_kp_driver = {
.probe = omap_kp_probe,
- .remove = omap_kp_remove,
+ .remove_new = omap_kp_remove,
.driver = {
.name = "omap-keypad",
},

drivers/input/keyboard/omap4-keypad.c

View file
diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index 773e55e..d3f8688 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -461,11 +461,9 @@ static int omap4_keypad_probe(struct platform_device *pdev)
return 0;
}
-static int omap4_keypad_remove(struct platform_device *pdev)
+static void omap4_keypad_remove(struct platform_device *pdev)
{
dev_pm_clear_wake_irq(&pdev->dev);
-
- return 0;
}
static const struct of_device_id omap_keypad_dt_match[] = {
@@ -476,7 +474,7 @@ MODULE_DEVICE_TABLE(of, omap_keypad_dt_match);
static struct platform_driver omap4_keypad_driver = {
.probe = omap4_keypad_probe,
- .remove = omap4_keypad_remove,
+ .remove_new = omap4_keypad_remove,
.driver = {
.name = "omap4-keypad",
.of_match_table = omap_keypad_dt_match,

drivers/input/keyboard/samsung-keypad.c

View file
diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c
index d85dd24..e212eff 100644
--- a/drivers/input/keyboard/samsung-keypad.c
+++ b/drivers/input/keyboard/samsung-keypad.c
@@ -444,7 +444,7 @@ err_unprepare_clk:
return error;
}
-static int samsung_keypad_remove(struct platform_device *pdev)
+static void samsung_keypad_remove(struct platform_device *pdev)
{
struct samsung_keypad *keypad = platform_get_drvdata(pdev);
@@ -453,8 +453,6 @@ static int samsung_keypad_remove(struct platform_device *pdev)
input_unregister_device(keypad->input_dev);
clk_unprepare(keypad->clk);
-
- return 0;
}
static int samsung_keypad_runtime_suspend(struct device *dev)
@@ -589,7 +587,7 @@ MODULE_DEVICE_TABLE(platform, samsung_keypad_driver_ids);
static struct platform_driver samsung_keypad_driver = {
.probe = samsung_keypad_probe,
- .remove = samsung_keypad_remove,
+ .remove_new = samsung_keypad_remove,
.driver = {
.name = "samsung-keypad",
.of_match_table = of_match_ptr(samsung_keypad_dt_match),

drivers/input/keyboard/sh_keysc.c

View file
diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c
index 2c00320..4ea4fd2 100644
--- a/drivers/input/keyboard/sh_keysc.c
+++ b/drivers/input/keyboard/sh_keysc.c
@@ -265,7 +265,7 @@ static int sh_keysc_probe(struct platform_device *pdev)
return error;
}
-static int sh_keysc_remove(struct platform_device *pdev)
+static void sh_keysc_remove(struct platform_device *pdev)
{
struct sh_keysc_priv *priv = platform_get_drvdata(pdev);
@@ -279,8 +279,6 @@ static int sh_keysc_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
kfree(priv);
-
- return 0;
}
static int sh_keysc_suspend(struct device *dev)
@@ -321,7 +319,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(sh_keysc_dev_pm_ops,
static struct platform_driver sh_keysc_device_driver = {
.probe = sh_keysc_probe,
- .remove = sh_keysc_remove,
+ .remove_new = sh_keysc_remove,
.driver = {
.name = "sh_keysc",
.pm = pm_sleep_ptr(&sh_keysc_dev_pm_ops),

drivers/input/keyboard/spear-keyboard.c

View file
diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c
index a50fa99..557d00a 100644
--- a/drivers/input/keyboard/spear-keyboard.c
+++ b/drivers/input/keyboard/spear-keyboard.c
@@ -272,14 +272,12 @@ static int spear_kbd_probe(struct platform_device *pdev)
return 0;
}
-static int spear_kbd_remove(struct platform_device *pdev)
+static void spear_kbd_remove(struct platform_device *pdev)
{
struct spear_kbd *kbd = platform_get_drvdata(pdev);
input_unregister_device(kbd->input);
clk_unprepare(kbd->clk);
-
- return 0;
}
static int spear_kbd_suspend(struct device *dev)
@@ -375,7 +373,7 @@ MODULE_DEVICE_TABLE(of, spear_kbd_id_table);
static struct platform_driver spear_kbd_driver = {
.probe = spear_kbd_probe,
- .remove = spear_kbd_remove,
+ .remove_new = spear_kbd_remove,
.driver = {
.name = "keyboard",
.pm = pm_sleep_ptr(&spear_kbd_pm_ops),

drivers/input/keyboard/stmpe-keypad.c

View file
diff --git a/drivers/input/keyboard/stmpe-keypad.c b/drivers/input/keyboard/stmpe-keypad.c
index 2c6c532..2013c0a 100644
--- a/drivers/input/keyboard/stmpe-keypad.c
+++ b/drivers/input/keyboard/stmpe-keypad.c
@@ -404,20 +404,18 @@ static int stmpe_keypad_probe(struct platform_device *pdev)
return 0;
}
-static int stmpe_keypad_remove(struct platform_device *pdev)
+static void stmpe_keypad_remove(struct platform_device *pdev)
{
struct stmpe_keypad *keypad = platform_get_drvdata(pdev);
stmpe_disable(keypad->stmpe, STMPE_BLOCK_KEYPAD);
-
- return 0;
}
static struct platform_driver stmpe_keypad_driver = {
.driver.name = "stmpe-keypad",
.driver.owner = THIS_MODULE,
.probe = stmpe_keypad_probe,
- .remove = stmpe_keypad_remove,
+ .remove_new = stmpe_keypad_remove,
};
module_platform_driver(stmpe_keypad_driver);

drivers/input/keyboard/tegra-kbc.c

View file
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
index c9a823e..a1765ed 100644
--- a/drivers/input/keyboard/tegra-kbc.c
+++ b/drivers/input/keyboard/tegra-kbc.c
@@ -14,7 +14,7 @@
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/of.h>
-#include <linux/of_device.h>
+#include <linux/property.h>
#include <linux/clk.h>
#include <linux/slab.h>
#include <linux/input/matrix_keypad.h>
@@ -602,9 +602,6 @@ static int tegra_kbc_probe(struct platform_device *pdev)
unsigned int debounce_cnt;
unsigned int scan_time_rows;
unsigned int keymap_rows;
- const struct of_device_id *match;
-
- match = of_match_device(tegra_kbc_of_match, &pdev->dev);
kbc = devm_kzalloc(&pdev->dev, sizeof(*kbc), GFP_KERNEL);
if (!kbc) {
@@ -613,7 +610,7 @@ static int tegra_kbc_probe(struct platform_device *pdev)
}
kbc->dev = &pdev->dev;
- kbc->hw_support = match->data;
+ kbc->hw_support = device_get_match_data(&pdev->dev);
kbc->max_keys = kbc->hw_support->max_rows *
kbc->hw_support->max_columns;
kbc->num_rows_and_columns = kbc->hw_support->max_rows +

drivers/input/misc/88pm80x_onkey.c

View file
diff --git a/drivers/input/misc/88pm80x_onkey.c b/drivers/input/misc/88pm80x_onkey.c
index 51c8a32..31f0702 100644
--- a/drivers/input/misc/88pm80x_onkey.c
+++ b/drivers/input/misc/88pm80x_onkey.c
@@ -138,14 +138,13 @@ out:
return err;
}
-static int pm80x_onkey_remove(struct platform_device *pdev)
+static void pm80x_onkey_remove(struct platform_device *pdev)
{
struct pm80x_onkey_info *info = platform_get_drvdata(pdev);
pm80x_free_irq(info->pm80x, info->irq, info);
input_unregister_device(info->idev);
kfree(info);
- return 0;
}
static struct platform_driver pm80x_onkey_driver = {
@@ -154,7 +153,7 @@ static struct platform_driver pm80x_onkey_driver = {
.pm = &pm80x_onkey_pm_ops,
},
.probe = pm80x_onkey_probe,
- .remove = pm80x_onkey_remove,
+ .remove_new = pm80x_onkey_remove,
};
module_platform_driver(pm80x_onkey_driver);

drivers/input/misc/axp20x-pek.c

View file
diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c
index 4581606..24f9e9d 100644
--- a/drivers/input/misc/axp20x-pek.c
+++ b/drivers/input/misc/axp20x-pek.c
@@ -133,20 +133,11 @@ static ssize_t axp20x_store_attr(struct device *dev,
size_t count)
{
struct axp20x_pek *axp20x_pek = dev_get_drvdata(dev);
- char val_str[20];
- size_t len;
int ret, i;
unsigned int val, idx = 0;
unsigned int best_err = UINT_MAX;
- val_str[sizeof(val_str) - 1] = '\0';
- strncpy(val_str, buf, sizeof(val_str) - 1);
- len = strlen(val_str);
-
- if (len && val_str[len - 1] == '\n')
- val_str[len - 1] = '\0';
-
- ret = kstrtouint(val_str, 10, &val);
+ ret = kstrtouint(buf, 10, &val);
if (ret)
return ret;

drivers/input/misc/da9052_onkey.c

View file
diff --git a/drivers/input/misc/da9052_onkey.c b/drivers/input/misc/da9052_onkey.c
index 6d11528..7a1122e 100644
--- a/drivers/input/misc/da9052_onkey.c
+++ b/drivers/input/misc/da9052_onkey.c
@@ -127,7 +127,7 @@ err_free_mem:
return error;
}
-static int da9052_onkey_remove(struct platform_device *pdev)
+static void da9052_onkey_remove(struct platform_device *pdev)
{
struct da9052_onkey *onkey = platform_get_drvdata(pdev);
@@ -136,13 +136,11 @@ static int da9052_onkey_remove(struct platform_device *pdev)
input_unregister_device(onkey->input);
kfree(onkey);
-
- return 0;
}
static struct platform_driver da9052_onkey_driver = {
.probe = da9052_onkey_probe,
- .remove = da9052_onkey_remove,
+ .remove_new = da9052_onkey_remove,
.driver = {
.name = "da9052-onkey",
},

drivers/input/misc/da9055_onkey.c

View file
diff --git a/drivers/input/misc/da9055_onkey.c b/drivers/input/misc/da9055_onkey.c
index 7a0d3a1..871812f 100644
--- a/drivers/input/misc/da9055_onkey.c
+++ b/drivers/input/misc/da9055_onkey.c
@@ -132,7 +132,7 @@ err_free_input:
return err;
}
-static int da9055_onkey_remove(struct platform_device *pdev)
+static void da9055_onkey_remove(struct platform_device *pdev)
{
struct da9055_onkey *onkey = platform_get_drvdata(pdev);
int irq = platform_get_irq_byname(pdev, "ONKEY");
@@ -141,13 +141,11 @@ static int da9055_onkey_remove(struct platform_device *pdev)
free_irq(irq, onkey);
cancel_delayed_work_sync(&onkey->work);
input_unregister_device(onkey->input);
-
- return 0;
}
static struct platform_driver da9055_onkey_driver = {
.probe = da9055_onkey_probe,
- .remove = da9055_onkey_remove,
+ .remove_new = da9055_onkey_remove,
.driver = {
.name = "da9055-onkey",
},

drivers/input/misc/ideapad_slidebar.c

View file
diff --git a/drivers/input/misc/ideapad_slidebar.c b/drivers/input/misc/ideapad_slidebar.c
index 68f1c58..fa4e7f6 100644
--- a/drivers/input/misc/ideapad_slidebar.c
+++ b/drivers/input/misc/ideapad_slidebar.c
@@ -256,20 +256,18 @@ err_release_ports:
return err;
}
-static int ideapad_remove(struct platform_device *pdev)
+static void ideapad_remove(struct platform_device *pdev)
{
i8042_remove_filter(slidebar_i8042_filter);
input_unregister_device(slidebar_input_dev);
release_region(IDEAPAD_BASE, 3);
-
- return 0;
}
static struct platform_driver slidebar_drv = {
.driver = {
.name = "ideapad_slidebar",
},
- .remove = ideapad_remove,
+ .remove_new = ideapad_remove,
};
static int __init ideapad_dmi_check(const struct dmi_system_id *id)

drivers/input/misc/iqs269a.c

View file
diff --git a/drivers/input/misc/iqs269a.c b/drivers/input/misc/iqs269a.c
index c0a0856..3c636c7 100644
--- a/drivers/input/misc/iqs269a.c
+++ b/drivers/input/misc/iqs269a.c
@@ -1586,10 +1586,7 @@ static struct attribute *iqs269_attrs[] = {
&dev_attr_ati_trigger.attr,
NULL,
};
-
-static const struct attribute_group iqs269_attr_group = {

This diff is incomplete. Download the complete patch.

drivers/input/misc/kxtj9.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/m68kspkr.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/max8997_haptic.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/mc13783-pwrbutton.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/palmas-pwrbutton.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/pcap_keys.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/pcf50633-input.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/pcspkr.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/pm8941-pwrkey.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/soc_button_array.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/sparcspkr.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/wistron_btns.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/wm831x-on.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/mouse/cyapa.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/mouse/navpoint.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/rmi4/rmi_bus.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/rmi4/rmi_f34.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/altera_ps2.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/ams_delta_serio.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/apbps2.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/arc_ps2.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/ct82c710.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/i8042-sparcio.h

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/i8042.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/ioc3kbd.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/maceps2.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/olpc_apsp.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/ps2-gpio.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/q40kbd.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/rpckbd.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/sun4i-ps2.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/xilinx_ps2.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/ad7877.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/ad7879-i2c.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/ad7879-spi.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/ad7879.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/ad7879.h

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/ads7846.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/cyttsp5.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/da9052_tsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/edt-ft5x06.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/elants_i2c.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/exc3000.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/hideep.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/hycon-hy46xx.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/ili210x.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/ilitek_ts_i2c.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/iqs5xx.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/mainstone-wm97xx.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/mc13783_ts.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/melfas_mip4.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/pcap_ts.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/raydium_i2c_ts.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/rohm_bu21023.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/s6sy761.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/stmfts.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/stmpe-ts.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/sun4i-ts.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/ti_am335x_tsc.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/tsc2004.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/tsc2005.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/tsc200x-core.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/tsc200x-core.h

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/wdt87xx_i2c.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/wm831x-ts.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/touchscreen/wm97xx-core.c

View file

This diff is incomplete. Download the complete patch.

include/linux/input.h

View file

This diff is incomplete. Download the complete patch.

include/linux/input/mt.h

View file

This diff is incomplete. Download the complete patch.